vibe.d beta banner
get vibe.d
0.8.4

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

Function EventDriverSockets.adoptDatagramSocket

Adopts an existing 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))) adoptDatagramSocket (
  int socket
) nothrow @safe;

The socket must be properly bound before this function is called.

Parameters

NameDescription
socket Socket file descriptor to adopt

Returns

Returns a socket handle corresponding to the passed socket descriptor. If the same file descriptor is already registered, DatagramSocketFD.invalid will be returned instead.

Authors
Copyright
License