Function ConnectedDatagramSocket.listen
Create a datagram stream socket and bind, as a listening server, to the address supplied
static ConnectedDatagramSocket listen
(
SockAddr sa,
bool reuseAddr = false
) @nogc @trusted;
static ConnectedDatagramSocket listen
(
SockAddrUnix sa,
bool reuseAddr = false
) @nogc @safe;
This creates a SOCK_SEQPACKET socket. It binds it to the designated address specified in sa and puts it in listening mode.
Parameters
Name | Description |
---|---|
sa | a socket address for the server to listen on. |
reuseAddr | Whether to set the SO_REUSEADDR socket option |
Returns
Returns the listening socket.
Throws
ErrnoException if the connection fails (e.g. - EADDRINUSE if binding to a used port). Also throws this if one of the system calls fails.