Struct StreamPeerTCP

TCP stream peer.

struct StreamPeerTCP ;

This object can be used to connect to TCP servers, or also is returned by a TCP server.

Methods

NameDescription
connectToHost Connects to the specified host:port pair. A hostname will be resolved if valid. Returns constant OK on success or constant FAILED on failure.
disconnectFromHost Disconnects from host.
getConnectedHost Returns the IP of this peer.
getConnectedPort Returns the port of this peer.
getStatus Returns the status of the connection, see status.
isConnectedToHost Returns true if this peer is currently connected to a host, false otherwise.
setNoDelay Disables Nagle's algorithm to improve latency for small packets. Note: For applications that send large packets or need to transfer a lot of data, this can decrease the total available bandwidth.

Enums

NameDescription
Constants
Status