roTCPServer

 

The JavaScript equivalent is net.socket.

ifTCPServerInstance

GetFailureReason() As String

Yields additional useful information if an roTCPServer method fails.

SetPort(port As Object)

Sets the message port that will receive events from an roTCPServer instance.

BindToPort(port As Dynamic) As Boolean

Prepares to accept incoming TCP connections on the specified port. Passing an integer to this method will specify a standard port number. This method can also accept an index of integer interfaces contained within an associative array, which can contain the following members:

  • -1: Any (this is the default value)

  • 0: Ethernet

  • 1: WiFi

  • 2: Modem

  • 32767: Loopback (i.e. TCP connections can only be established by internal sources)

ifUserData

SetUserData(a As Object) 

Supplies an object that will be provided by every event called by an roTCPServer instance.

GetUserData() As Object

Returns the user data that has previously been set via SetUserData(). It will return Invalid if no data has been set.

 

Â