vibe.d beta banner
get vibe.d
0.8.3

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

Function EventDriverSockets.createDatagramSocket

Creates a connection-less datagram socket.

abstract Handle!("datagramSocket",eventcore.driver.Handle!("socket",eventcore.driver.Handle!("fd",ulong,-1L).Handle,eventcore.driver.Handle!("fd",ulong,-1L).Handle(-1)).Handle,eventcore.driver.Handle!("socket",eventcore.driver.Handle!("fd",ulong,-1L).Handle,eventcore.driver.Handle!("fd",ulong,-1L).Handle(-1)).Handle((-1))) 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