FixIO Documentation
Back to summary
import "io/tcp";
AsyncTCPServer class
Asynchronous TCP server.
Initialization
static function create(port: Integer): AsyncTCPServer
-
Creates a new TCP server on given port.
static function create_local(port: Integer): AsyncTCPServer
-
Creates a new TCP server on given port, listening on localhost only.
Functions
function close()
-
Closes the TCP server.
function accept(callback, data)
-
Initiates accepting of a single client connection. Once connected the callback is called. The callback
must have this signature:
function callback(data, conn: AsyncTCPConnection)
The conn
parameter provides the established connection.