TCP Stream peer.
|int||connect_to_host ( String host, int port )|
|void||disconnect_from_host ( )|
|String||get_connected_host ( ) const|
|int||get_connected_port ( ) const|
|int||get_status ( ) const|
|bool||is_connected_to_host ( ) const|
|void||set_no_delay ( bool enabled )|
StreamPeerTCP, also the status after a disconnect.
StreamPeerTCPthat is connecting to a host.
StreamPeerTCPthat is connected to a host.
StreamPeerTCPin error state.
TCP Stream peer. This object can be used to connect to TCP servers, or also is returned by a tcp server.
Connect to the specified host:port pair. A hostname will be resolved if valid. Returns OK on success or FAILED on failure.
Disconnect from host.
Return the IP of this peer.
Return the port of this peer.
Return the status of the connection, one of STATUS_* enum.
Disable Nagle algorithm to improve latency for small packets.
Note that for applications that send large packets, or need to transfer a lot of data, this can reduce total bandwidth.
© 2014–2018 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.