ConnectedDatagramSocket.connect

Create a stream socket and connect, as client, to the address supplied

This creates a SOCK_SEQPACKET socket. It connects it to the designated server specified in sa, and waits, through the reactor, for the connection to be established.

  1. ConnectedDatagramSocket connect(SockAddr sa, Timeout timeout)
  2. ConnectedDatagramSocket connect(SockAddrUnix sa, Timeout timeout)
    struct ConnectedDatagramSocket
    static @safe @nogc
    connect
    (
    SockAddrUnix sa
    ,)

Parameters

sa SockAddrUnix

a socket address for the server to connect to.

timeout Timeout

the timeout for the connection. Throws TimeoutExpired if the timeout expires

Return Value

Returns the connected socket.

Throws

TimeoutExpired if the timeout expires

ErrnoException if the connection fails (e.g. - ECONNREFUSED if connecting to a non-listening port). Also throws this if one of the system calls fails.

Anything else: May throw any exception injected using throwInFiber.

Meta