LibasyncEventDriverSockets

Undocumented in source.
version(Have_libasync)
final
class LibasyncEventDriverSockets : EventDriverSockets {}

Members

Aliases

listenStream
alias listenStream = EventDriverSockets.listenStream
Undocumented in source.

Functions

addRef
void addRef(SocketFD descriptor)
Undocumented in source. Be warned that the author may not have intended to support it.
adoptDatagramSocket
DatagramSocketFD adoptDatagramSocket(int socket)
Undocumented in source. Be warned that the author may not have intended to support it.
adoptStream
StreamSocketFD adoptStream(int socket)
Undocumented in source. Be warned that the author may not have intended to support it.
cancelConnectStream
void cancelConnectStream(StreamSocketFD sock)
Undocumented in source. Be warned that the author may not have intended to support it.
cancelRead
void cancelRead(StreamSocketFD socket)
Undocumented in source. Be warned that the author may not have intended to support it.
cancelReceive
void cancelReceive(DatagramSocketFD socket)
Undocumented in source. Be warned that the author may not have intended to support it.
cancelSend
void cancelSend(DatagramSocketFD socket)
Undocumented in source. Be warned that the author may not have intended to support it.
cancelWrite
void cancelWrite(StreamSocketFD socket)
Undocumented in source. Be warned that the author may not have intended to support it.
connectStream
StreamSocketFD connectStream(Address peer_address, Address bind_address, ConnectCallback on_connect)
Undocumented in source. Be warned that the author may not have intended to support it.
createDatagramSocket
DatagramSocketFD createDatagramSocket(Address bind_address, Address target_address)
Undocumented in source. Be warned that the author may not have intended to support it.
getConnectionState
ConnectionState getConnectionState(StreamSocketFD sock)
Undocumented in source. Be warned that the author may not have intended to support it.
getLocalAddress
bool getLocalAddress(SocketFD sock, RefAddress dst)
Undocumented in source. Be warned that the author may not have intended to support it.
getRemoteAddress
bool getRemoteAddress(SocketFD sock, RefAddress dst)
Undocumented in source. Be warned that the author may not have intended to support it.
listenStream
StreamListenSocketFD listenStream(Address bind_address, StreamListenOptions options, AcceptCallback on_accept)
Undocumented in source. Be warned that the author may not have intended to support it.
read
void read(StreamSocketFD socket, ubyte[] buffer, IOMode mode, IOCallback on_read_finish)
Undocumented in source. Be warned that the author may not have intended to support it.
receive
void receive(DatagramSocketFD socket, ubyte[] buffer, IOMode mode, DatagramIOCallback on_receive_finish)
Undocumented in source. Be warned that the author may not have intended to support it.
releaseRef
bool releaseRef(SocketFD descriptor)
Undocumented in source. Be warned that the author may not have intended to support it.
send
void send(DatagramSocketFD socket, const(ubyte)[] buffer, IOMode mode, Address target_address, DatagramIOCallback on_send_finish)
Undocumented in source. Be warned that the author may not have intended to support it.
setBroadcast
bool setBroadcast(DatagramSocketFD socket, bool enable)
Undocumented in source. Be warned that the author may not have intended to support it.
setKeepAlive
void setKeepAlive(StreamSocketFD socket, bool enable)
Undocumented in source. Be warned that the author may not have intended to support it.
setTCPNoDelay
void setTCPNoDelay(StreamSocketFD socket, bool enable)
Undocumented in source. Be warned that the author may not have intended to support it.
setTargetAddress
void setTargetAddress(DatagramSocketFD socket, Address target_address)
Undocumented in source. Be warned that the author may not have intended to support it.
shutdown
void shutdown(StreamSocketFD socket, bool shut_read, bool shut_write)
Undocumented in source. Be warned that the author may not have intended to support it.
waitForConnections
void waitForConnections(StreamListenSocketFD sock, AcceptCallback on_accept)
Undocumented in source. Be warned that the author may not have intended to support it.
waitForData
void waitForData(StreamSocketFD socket, IOCallback on_data_available)
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(StreamSocketFD socket, const(ubyte)[] buffer, IOMode mode, IOCallback on_write_finish)
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From EventDriverSockets

connectStream
StreamSocketFD connectStream(Address peer_address, Address bind_address, ConnectCallback on_connect)

Connects to a stream listening socket.

cancelConnectStream
void cancelConnectStream(StreamSocketFD sock)

Aborts asynchronous connect by closing the socket.

adoptStream
StreamSocketFD adoptStream(int socket)

Adopts an existing stream socket.

listenStream
StreamListenSocketFD listenStream(Address bind_address, StreamListenOptions options, AcceptCallback on_accept)

Creates a socket listening for incoming stream connections.

listenStream
StreamListenSocketFD listenStream(Address bind_address, AcceptCallback on_accept)
Undocumented in source. Be warned that the author may not have intended to support it.
waitForConnections
void waitForConnections(StreamListenSocketFD sock, AcceptCallback on_accept)

Starts to wait for incoming connections on a listening socket.

getConnectionState
ConnectionState getConnectionState(StreamSocketFD sock)

Determines the current connection state.

getLocalAddress
bool getLocalAddress(SocketFD sock, RefAddress dst)

Retrieves the bind address of a socket.

getRemoteAddress
bool getRemoteAddress(SocketFD sock, RefAddress dst)

Retrieves the address of the connected peer.

setTCPNoDelay
void setTCPNoDelay(StreamSocketFD socket, bool enable)

Sets the TCP_NODELAY option on a socket

setKeepAlive
void setKeepAlive(StreamSocketFD socket, bool enable)

Sets to SO_KEEPALIVE socket option on a socket.

setKeepAliveParams
void setKeepAliveParams(StreamSocketFD socket, Duration idle, Duration interval, int probeCount)

Enables keepalive for the TCP socket and sets additional parameters. Silently ignores unsupported systems (anything but Windows and Linux).

setUserTimeout
void setUserTimeout(StreamSocketFD socket, Duration timeout)

Sets TCP_USER_TIMEOUT socket option (linux only). https://tools.ietf.org/html/rfc5482

read
void read(StreamSocketFD socket, ubyte[] buffer, IOMode mode, IOCallback on_read_finish)

Reads data from a stream socket.

cancelRead
void cancelRead(StreamSocketFD socket)

Cancels an ongoing read operation.

write
void write(StreamSocketFD socket, const(ubyte)[] buffer, IOMode mode, IOCallback on_write_finish)

Reads data from a stream socket.

cancelWrite
void cancelWrite(StreamSocketFD socket)

Cancels an ongoing write operation.

waitForData
void waitForData(StreamSocketFD socket, IOCallback on_data_available)

Waits for incoming data without actually reading it.

shutdown
void shutdown(StreamSocketFD socket, bool shut_read, bool shut_write)

Initiates a connection close.

createDatagramSocket
DatagramSocketFD createDatagramSocket(Address bind_address, Address target_address, DatagramCreateOptions options)

Creates a connection-less datagram socket.

adoptDatagramSocket
DatagramSocketFD adoptDatagramSocket(int socket)

Adopts an existing datagram socket.

setTargetAddress
void setTargetAddress(DatagramSocketFD socket, Address target_address)

Sets an address to use as the default target address for sent datagrams.

setBroadcast
bool setBroadcast(DatagramSocketFD socket, bool enable)

Sets the SO_BROADCAST socket option.

joinMulticastGroup
bool joinMulticastGroup(DatagramSocketFD socket, Address multicast_address, uint interface_index)

Joins the multicast group associated with the given IP address.

receive
void receive(DatagramSocketFD socket, ubyte[] buffer, IOMode mode, DatagramIOCallback on_receive_finish)

Receives a single datagram.

cancelReceive
void cancelReceive(DatagramSocketFD socket)

Cancels an ongoing wait for an incoming datagram.

send
void send(DatagramSocketFD socket, const(ubyte)[] buffer, IOMode mode, Address target_address, DatagramIOCallback on_send_finish)

Sends a single datagram.

cancelSend
void cancelSend(DatagramSocketFD socket)

Cancels an ongoing wait for an outgoing datagram.

isValid
bool isValid(SocketFD handle)

Determines whether the given socket handle is valid.

addRef
void addRef(SocketFD descriptor)

Increments the reference count of the given socket.

releaseRef
bool releaseRef(SocketFD descriptor)

Decrements the reference count of the given socket.

setOption
bool setOption(DatagramSocketFD socket, DatagramSocketOption option, bool enable)
bool setOption(StreamSocketFD socket, StreamSocketOption option, bool enable)

Enables or disables a socket option.

userData
FD userData [@property setter]
deprecated FD userData [@property setter]

Retrieves a reference to a user-defined value associated with a descriptor.

rawUserData
void* rawUserData(StreamSocketFD descriptor, size_t size, DataInitializer initialize, DataInitializer destroy)
void* rawUserData(StreamListenSocketFD descriptor, size_t size, DataInitializer initialize, DataInitializer destroy)
void* rawUserData(DatagramSocketFD descriptor, size_t size, DataInitializer initialize, DataInitializer destroy)

Low-level user data access. Use getUserData instead.

Meta