ConnectedDatagramSocket.listen

Create a datagram stream socket and bind, as a listening server, to the address supplied

This creates a SOCK_SEQPACKET socket. It binds it to the designated address specified in sa and puts it in listening mode.

  1. ConnectedDatagramSocket listen(SockAddr sa, bool reuseAddr)
  2. ConnectedDatagramSocket listen(SockAddrUnix sa, bool reuseAddr)
    struct ConnectedDatagramSocket
    static @safe @nogc
    listen
    (
    SockAddrUnix sa
    ,
    bool reuseAddr = false
    )

Parameters

sa SockAddrUnix

a socket address for the server to listen on.

reuseAddr bool

Whether to set the SO_REUSEADDR socket option

Return Value

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.

Meta