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)
    struct ConnectedDatagramSocket
    static @trusted @nogc
    listen
    (
    SockAddr sa
    ,
    bool reuseAddr = false
    )
  2. ConnectedDatagramSocket listen(SockAddrUnix sa, bool reuseAddr)

Parameters

sa SockAddr

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