TCPConnection

Represents a single TCP connection.

Members

Properties

keepAlive
bool keepAlive [@property setter]
bool keepAlive [@property getter]

Enables TCP keep-alive packets.

localAddress
NetworkAddress localAddress [@property getter]

The local/bind address of the underlying socket.

peerAddress
string peerAddress [@property getter]

Returns the IP address of the connected peer.

readTimeout
Duration readTimeout [@property setter]
Duration readTimeout [@property getter]

Controls the read time out after which the connection is closed automatically.

remoteAddress
NetworkAddress remoteAddress [@property getter]

The address of the connected peer.

tcpNoDelay
bool tcpNoDelay [@property setter]
bool tcpNoDelay [@property getter]

Used to disable Nagle's algorithm.

Inherited Members

From ConnectionStream

connected
bool connected [@property getter]

Determines The current connection status.

close
void close()

Actively closes the connection and frees associated resources.

waitForData
bool waitForData(Duration timeout)

Blocks until data becomes available for read.

Meta