vibe.d beta banner
get vibe.d
0.8.3

Asynchronous I/O that doesn’t get in your way, written in D

Function EventDriverSockets.getLocalAddress

Retrieves the bind address of a socket.

abstract {null} getLocalAddress ();

Example

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);
Authors
Copyright
License