StreamPeerTCP

TCP stream peer.

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

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Constants
enum Constants
Status
enum Status

Functions

connectToHost
GodotError connectToHost(String host, long port)

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
void disconnectFromHost()

Disconnects from host.

getConnectedHost
String getConnectedHost()

Returns the IP of this peer.

getConnectedPort
long getConnectedPort()

Returns the port of this peer.

getStatus
StreamPeerTCP.Status getStatus()

Returns the status of the connection, see status.

isConnectedToHost
bool isConnectedToHost()

Returns true if this peer is currently connected or is connecting to a host, false otherwise.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(StreamPeerTCP other)
opEquals
bool opEquals(typeof(null) n)
setNoDelay
void setNoDelay(bool enabled)

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.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
StreamPeerTCP _new()

Construct a new instance of StreamPeerTCP. Note: use memnew!StreamPeerTCP instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta