Connects to the specified host:port pair. A hostname will be resolved if valid. Returns constant OK on success or constant FAILED on failure.
Disconnects from host.
Returns the IP of this peer.
Returns the port of this peer.
Returns the status of the connection, see status.
Returns true if this peer is currently connected or is connecting to a host, false otherwise.
If enabled is true, packets will be sent immediately. If enabled is false (the default), packet transfers will be delayed and combined using url=https://en.wikipedia.org/wiki/Nagle%27s_algorithmNagle's algorithm/url. Note: It's recommended to leave this disabled for applications that send large packets or need to transfer a lot of data, as enabling this can decrease the total available bandwidth.
Construct a new instance of StreamPeerTCP. Note: use memnew!StreamPeerTCP instead.
TCP stream peer.
This object can be used to connect to TCP servers, or also is returned by a TCP server.