Function DatagramSocket.create

Create a datagram socket

static DatagramSocket create (
  SockAddr bindAddr
) @nogc @safe;

This creates a SOCK_DGRAM (UDP type) socket.

Parameters

NameDescription
bindAddr a socket address for the server to connect to.

Returns

Returns the newly created socket.

Throws

ErrnoException if the connection fails. Also throws this if one of the system calls fails.