vibe.d beta banner
get vibe.d
0.10.1

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
) 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.

Returns

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

Authors
Copyright
License