vibe.d beta banner
get vibe.d
0.9.4

Asynchronous I/O that doesn’t get in your way, written in D

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

NameDescription
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.init is used.

Returns

Returns a datagram socket handle if the socket was created successfully. Otherwise returns DatagramSocketFD.invalid.

Authors
Copyright
License