vibe.core.net

TCP/UDP connection and server handling.

Public Imports

vibe.core.stream
public import vibe.core.stream;
Undocumented in source.

Members

Enums

TCPListenOptions
enum TCPListenOptions

Flags to control the behavior of listenTCP.

Functions

anyAddress
NetworkAddress anyAddress()
Undocumented in source. Be warned that the author may not have intended to support it.
connectTCP
TCPConnection connectTCP(string host, ushort port, string bind_interface, ushort bind_port)
TCPConnection connectTCP(NetworkAddress addr, NetworkAddress bind_address)

Establishes a connection to the given host/port.

listenTCP
TCPListener[] listenTCP(ushort port, void delegate(TCPConnection stream) @(safe) connection_callback, TCPListenOptions options)
TCPListener listenTCP(ushort port, void delegate(TCPConnection stream) @(safe) connection_callback, string address, TCPListenOptions options)
TCPListener[] listenTCP(ushort port, void delegate(TCPConnection stream) @(system) connection_callback, TCPListenOptions options)
TCPListener listenTCP(ushort port, void delegate(TCPConnection stream) @(system) connection_callback, string address, TCPListenOptions options)

Starts listening on the specified port.

listenTCP_s
TCPListener[] listenTCP_s(ushort port, void function(TCPConnection stream) @(safe) connection_callback, TCPListenOptions options)
TCPListener listenTCP_s(ushort port, void function(TCPConnection stream) @(safe) connection_callback, string address, TCPListenOptions options)

Starts listening on the specified port.

listenUDP
UDPConnection listenUDP(ushort port, string bind_address)

Creates a bound UDP socket suitable for sending and receiving packets.

resolveHost
NetworkAddress resolveHost(string host, AddressFamily address_family, bool use_dns)
NetworkAddress resolveHost(string host, ushort address_family, bool use_dns)

Resolves the given host name/IP address string.

Imports

AddressFamily (from std.socket)
public import std.socket : AddressFamily;
Undocumented in source.

Interfaces

TCPConnection
interface TCPConnection

Represents a single TCP connection.

TCPListener
interface TCPListener

Represents a listening TCP socket.

UDPConnection
interface UDPConnection

Represents a bound and possibly 'connected' UDP socket.

Structs

NetworkAddress
struct NetworkAddress

Represents a network/socket address.

Meta

Authors

Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.