v2026.6.4
All Bundles
Bundle Provides network support

TCPSocketServer

TCP/IP Server socket

Operations

Accept #

Accepts a client connection

method : public : Accept() ~ TCPSocket

Return

TypeDescription
TCPSocketclient socket interface

Close #

Closes the server socket

method : public : Close() ~ Nil

GetLastError # function

Get the last error

function : GetLastError() ~ String

Return

TypeDescription
Stringlast error message, or Nil of no error

Listen #

Listens for incoming client connections

method : public : Listen(backlog:Int) ~ Bool

Parameters

NameTypeDescription
backlogIntmaximum length to queue pending connections

Return

TypeDescription
Booltrue if client successfully connects, false otherwise

New # constructor

Default constructor

New(port:Int)

Parameters

NameTypeDescription
portIntserver port