Bundle Provides network support
TCPSocketServer
TCP/IP Server socket
Operations
Accept #
Accepts a client connection
method : public : Accept() ~ TCPSocket
Return
| Type | Description |
|---|
| TCPSocket | client socket interface |
Close #
Closes the server socket
method : public : Close() ~ Nil
GetLastError # function
Get the last error
function : GetLastError() ~ String
Return
| Type | Description |
|---|
| String | last error message, or Nil of no error |
Listen #
Listens for incoming client connections
method : public : Listen(backlog:Int) ~ Bool
Parameters
| Name | Type | Description |
|---|
| backlog | Int | maximum length to queue pending connections |
Return
| Type | Description |
|---|
| Bool | true if client successfully connects, false otherwise |
New # constructor
Default constructor
New(port:Int)
Parameters
| Name | Type | Description |
|---|
| port | Int | server port |