ConnectedDatagramSocket.accept

draws a new client connection from a listening socket

This function waits for a client to connect to the socket. Once that happens, it returns with a ConnectedSocket for the new client.

struct ConnectedDatagramSocket
@trusted @nogc
accept

Parameters

clientAddr SockAddr

an out parameter that receives the socket address of the client that connected.

timeout Timeout

how long to wait for a new connection

Return Value

Returns the connected socket.

Throws

ErrnoException if the connection fails (e.g. - EINVAL if accepting from a non-listening socket, or ECONNABORTED if a connection was aborted). Also throws this if one of the system calls fails.

TimeoutExpired if the timeout expires

Anything else: May throw any exception injected using throwInFiber.

Meta