Difference between revisions of "HTTPServer"

From Lianjapedia
Jump to: navigation, search
(See Also)
 
(10 intermediate revisions by 2 users not shown)
Line 10: Line 10:
 
!Value
 
!Value
 
!width="50%"|Description
 
!width="50%"|Description
 +
|-
 +
|valign="top"|requestHandler
 +
|valign="top"|RW
 +
|valign="top"|Logical
 +
|valign="top"|If set to true the '''receivedMesage''' event is dispatched.
 +
|-
 +
|valign="top"|responseText
 +
|valign="top"|RW
 +
|valign="top"|Character
 +
|valign="top"|The text to to written back to the TCPIP client after handling a request in the '''receivedMessage''' event.
 
|-
 
|-
 
|}
 
|}
Line 46: Line 56:
 
====Events====
 
====Events====
  
This class supports the following events:
+
This class supports the the following events:
  
 
{| class="wikitable" width="100%"
 
{| class="wikitable" width="100%"
Line 53: Line 63:
 
!width="50%"|Description
 
!width="50%"|Description
 
|-
 
|-
 +
|valign="top"|receivedMessage
 +
|valign="top"|message as character
 +
|valign="top"|Event dispatched when data is received on the socket. This method should set the '''responsetext''' if required to send a response to the client on the socket. This event is only dispatched if '''requesthandler''' is set to true.
 +
|-
 +
 
|}
 
|}
  
Line 61: Line 76:
 
[[Category:Framework Classes]]
 
[[Category:Framework Classes]]
 
[[Category:Lianja v2.0]]
 
[[Category:Lianja v2.0]]
 +
[[Category:Lianja v9.7]]

Latest revision as of 05:29, 20 May 2024

Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.

Properties

This class supports the following properties:

Property Access (R/RW) Value Description
requestHandler RW Logical If set to true the receivedMesage event is dispatched.
responseText RW Character The text to to written back to the TCPIP client after handling a request in the receivedMessage event.

Methods

This class supports the following methods:

Method Args Description
IsListening None Returns true if HTTPServer is listening, false otherwise
Listen interface as Character, port as Numeric Starts listening on the specified port on the specified interface ("" for all)
Pause None Pauses listening
Resume None Resumes listening
Stop None Stops listening

Events

This class supports the the following events:

Event Args Description
receivedMessage message as character Event dispatched when data is received on the socket. This method should set the responsetext if required to send a response to the client on the socket. This event is only dispatched if requesthandler is set to true.

See Also

App Settings, Embedded HTTP Server