Module vibe.core.net
TCP/UDP connection and server handling.
Functions
Name | Description |
---|---|
anyAddress()
|
|
connectTCP(host, port, bind_interface, bind_port, timeout)
|
Establishes a connection to the given host/port. |
listenTCP(port, connection_callback, options)
|
Starts listening on the specified port. |
listenTCP(port, connection_callback, options)
|
Compatibility overload - use an @safe nothrow callback instead.
|
listenTCP_s(port, connection_callback, options)
|
Starts listening on the specified port. |
listenUDP(addr, options)
|
Creates a bound UDP socket suitable for sending and receiving packets. |
resolveHost(host, family, use_dns, timeout)
|
Resolves the given host name/IP address string. |
Classes
Name | Description |
---|---|
ReadTimeoutException
|
Thrown by TCPConnection read-alike operations when timeout is reached. |
Structs
Name | Description |
---|---|
NetworkAddress
|
Represents a network/socket address. |
TCPConnection
|
Represents a single TCP connection. |
TCPListener
|
Represents a listening TCP socket. |
UDPConnection
|
Represents a bound and possibly 'connected' UDP socket. |
Enums
Name | Description |
---|---|
TCPListenOptions
|
Flags to control the behavior of listenTCP. |
UDPListenOptions
|
Flags to control the behavior of listenUDP
|
WaitForDataAsyncStatus
|
Represents possible return values for TCPConnection.waitForDataAsync. |
WaitForDataStatus
|
Aliases
Name | Type | Description |
---|---|---|
TCPConnectionDelegate
|
nothrow @safe void delegate(TCPConnection)
|
Callback invoked for incoming TCP connections. |
TCPConnectionFunction
|
nothrow @safe void function(TCPConnection)
|
Callback invoked for incoming TCP connections. |