EventDriverSockets.getLocalAddress

Retrieves the bind address of a socket.

interface EventDriverSockets
@safe nothrow
bool
getLocalAddress

Examples

The following code can be used to retrieve an IPv4/IPv6 address allocated on the stack. Note that Unix domain sockets require a larger buffer (e.g. sockaddr_storage).

scope storage = new UnknownAddress;
scope sockaddr = new RefAddress(storage.name, storage.nameLen);
eventDriver.sockets.getLocalAddress(sock, sockaddr);

Meta