TCP_Server

A TCP server.

Listens to connections on a port and returns a StreamPeerTCP when it gets an incoming connection.

Members

Aliases

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

Functions

isConnectionAvailable
bool isConnectionAvailable()

Returns true if a connection is available for taking.

isListening
bool isListening()

Returns true if the server is currently listening for connections.

listen
GodotError listen(long port, String bind_address)

Listen on the port binding to bind_address. If bind_address is set as "*" (default), the server will listen on all available addresses (both IPv4 and IPv6). If bind_address is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the server will listen on all available addresses matching that IP type. If bind_address is set to any valid address (e.g. "192.168.1.101", "::1", etc), the server will only listen on the interface with that addresses (or fail if no interface with the given address exists).

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(TCP_Server other)
opEquals
bool opEquals(typeof(null) n)
stop
void stop()

Stops listening.

takeConnection
Ref!StreamPeerTCP takeConnection()

If a connection is available, returns a StreamPeerTCP with the connection.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
TCP_Server _new()

Construct a new instance of TCP_Server. Note: use memnew!TCP_Server 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