FixIO Documentation
Back to summary
import "io/tcp";
TCPServer class
TCP server.
Initialization
static function create(port: Integer): TCPServer
-
Creates a new TCP server on given port.
static function create_local(port: Integer): TCPServer
-
Creates a new TCP server on given port, listening on localhost only.
Functions
function close()
-
Closes the TCP server.
function accept(): TCPConnection
function accept(timeout: Integer): TCPConnection
-
Accepts a client connection. You can provide a timeout for waiting: negative value means infinite
waiting (the default) and zero means no blocking. The timeout is in milliseconds.