Function EventDriverSockets.createDatagramSocket
Creates a connection-less datagram socket.
abstract DatagramSocketFD createDatagramSocket
(
scope std .socket .Address bind_address,
scope std .socket .Address target_address,
DatagramCreateOptions options = DatagramCreateOptions .none
) nothrow @safe;
Parameters
Name | Description |
---|---|
bind_address | The local bind address to use for the socket. It will be able to receive any messages sent to this address. |
target_address | Optional default target address. If this is
specified and the target address parameter of send is
left to null , it will be used instead. |
options | Optional options for datagram creation. If unset,
DatagramCreateOptions is used. |
Returns
Returns a datagram socket handle if the socket was created
successfully. Otherwise returns DatagramSocketFD
.