dlib.network.socket

Platform-independent socket API

Public Imports

std.socket
public import std.socket : AddressException, socket_t, Linger, SocketOptionLevel, SocketType, AddressFamily, AddressInfo, SocketOption;

Members

Aliases

LPFN_GETACCEPTEXSOCKADDRS
alias LPFN_GETACCEPTEXSOCKADDRS = VOID function(PVOID, DWORD, DWORD, DWORD, SOCKADDR**, LPINT, SOCKADDR**, LPINT)
Undocumented in source.
LPWSABUF
alias LPWSABUF = WSABUF*
Undocumented in source.
LPWSAOVERLAPPED
alias LPWSAOVERLAPPED = WSAOVERLAPPED*
Undocumented in source.
LPWSAPROTOCOLCHAIN
alias LPWSAPROTOCOLCHAIN = WSAPROTOCOLCHAIN*
Undocumented in source.
LPWSAPROTOCOL_INFO
alias LPWSAPROTOCOL_INFO = WSAPROTOCOL_INFO*
Undocumented in source.
SIO_ADDRESS_LIST_CHANGE
alias SIO_ADDRESS_LIST_CHANGE = _WSAIO!(IOC_WS2, 23)
Undocumented in source.
SIO_ADDRESS_LIST_QUERY
alias SIO_ADDRESS_LIST_QUERY = _WSAIOR!(IOC_WS2, 22)
Undocumented in source.
SIO_ASSOCIATE_HANDLE
alias SIO_ASSOCIATE_HANDLE = _WSAIOW!(IOC_WS2, 1)
Undocumented in source.
SIO_ENABLE_CIRCULAR_QUEUEING
alias SIO_ENABLE_CIRCULAR_QUEUEING = _WSAIO!(IOC_WS2, 2)
Undocumented in source.
SIO_FIND_ROUTE
alias SIO_FIND_ROUTE = _WSAIOR!(IOC_WS2, 3)
Undocumented in source.
SIO_FLUSH
alias SIO_FLUSH = _WSAIO!(IOC_WS2, 4)
Undocumented in source.
SIO_GET_BROADCAST_ADDRESS
alias SIO_GET_BROADCAST_ADDRESS = _WSAIOR!(IOC_WS2, 5)
Undocumented in source.
SIO_GET_EXTENSION_FUNCTION_POINTER
alias SIO_GET_EXTENSION_FUNCTION_POINTER = _WSAIORW!(IOC_WS2, 6)
Undocumented in source.
SIO_GET_GROUP_QOS
alias SIO_GET_GROUP_QOS = _WSAIORW!(IOC_WS2, 8)
Undocumented in source.
SIO_GET_QOS
alias SIO_GET_QOS = _WSAIORW!(IOC_WS2, 7)
Undocumented in source.
SIO_MULTICAST_SCOPE
alias SIO_MULTICAST_SCOPE = _WSAIOW!(IOC_WS2, 10)
Undocumented in source.
SIO_MULTIPOINT_LOOPBACK
alias SIO_MULTIPOINT_LOOPBACK = _WSAIOW!(IOC_WS2, 9)
Undocumented in source.
SIO_NSP_NOTIFY_CHANGE
alias SIO_NSP_NOTIFY_CHANGE = _WSAIOW!(IOC_WS2, 25)
Undocumented in source.
SIO_QUERY_TARGET_PNP_HANDLE
alias SIO_QUERY_TARGET_PNP_HANDLE = _WSAIOR!(IOC_WS2, 24)
Undocumented in source.
SIO_ROUTING_INTERFACE_CHANGE
alias SIO_ROUTING_INTERFACE_CHANGE = _WSAIOW!(IOC_WS2, 21)
Undocumented in source.
SIO_ROUTING_INTERFACE_QUERY
alias SIO_ROUTING_INTERFACE_QUERY = _WSAIORW!(IOC_WS2, 20)
Undocumented in source.
SIO_SET_GROUP_QOS
alias SIO_SET_GROUP_QOS = _WSAIOW!(IOC_WS2, 12)
Undocumented in source.
SIO_SET_QOS
alias SIO_SET_QOS = _WSAIOW!(IOC_WS2, 11)
Undocumented in source.
SIO_TRANSLATE_HANDLE
alias SIO_TRANSLATE_HANDLE = _WSAIORW!(IOC_WS2, 13)
Undocumented in source.
WSASocket
alias WSASocket = WSASocketW
Undocumented in source.

Classes

Address
class Address

Socket address representation.

ConnectedSocket
class ConnectedSocket

Socket returned if a connection has been established.

InternetAddress
class InternetAddress
Undocumented in source.
OverlappedConnectedSocket
class OverlappedConnectedSocket

Socket returned if a connection has been established.

OverlappedStreamSocket
class OverlappedStreamSocket
Undocumented in source.
Socket
class Socket

Class for creating a network communication endpoint using the Berkeley sockets interfaces of different types.

SocketException
class SocketException

$(D_PSYMBOL SocketException) should be thrown only if one of the socket functions returns -1 or $(D_PSYMBOL SOCKET_ERROR) and sets $(D_PSYMBOL errno), because $(D_PSYMBOL SocketException) relies on the $(D_PSYMBOL errno) value.

SocketState
class SocketState
Undocumented in source.
State
class State
Undocumented in source.
StreamSocket
class StreamSocket
Undocumented in source.

Enums

IOC_UNIX
anonymousenum IOC_UNIX
Undocumented in source.
OverlappedSocketEvent
enum OverlappedSocketEvent
Undocumented in source.
SocketError
enum SocketError

Error codes for $(D_PSYMBOL Socket).

WSA_FLAG_OVERLAPPED
anonymousenum WSA_FLAG_OVERLAPPED
Undocumented in source.

Functions

WSARecv
int WSARecv(SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesRecvd, LPDWORD lpFlags, LPOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
WSASend
int WSASend(SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPDWORD lpNumberOfBytesRecvd, DWORD lpFlags, LPOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
accept4
int accept4(int , sockaddr* , socklen_t* , int flags)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
wouldHaveBlocked
bool wouldHaveBlocked()

Checks if the last error is a serious error or just a special behaviour error of non-blocking sockets (for example an error returned because the socket would block or because the asynchronous operation was successfully started but not finished yet).

Interfaces

ConnectionOrientedSocket
interface ConnectionOrientedSocket

Interface with common fileds for stream and connected sockets.

Manifest constants

SOCK_NONBLOCK
enum SOCK_NONBLOCK;
Undocumented in source.
SO_UPDATE_ACCEPT_CONTEXT
enum SO_UPDATE_ACCEPT_CONTEXT;
Undocumented in source.

Structs

WSABUF
struct WSABUF
Undocumented in source.
WSAOVERLAPPED
struct WSAOVERLAPPED
Undocumented in source.
WSAPROTOCOLCHAIN
struct WSAPROTOCOLCHAIN
Undocumented in source.
WSAPROTOCOL_INFO
struct WSAPROTOCOL_INFO
Undocumented in source.

Templates

_WSAIO
template _WSAIO(int x, int y)
Undocumented in source.
_WSAIOR
template _WSAIOR(int x, int y)
Undocumented in source.
_WSAIORW
template _WSAIORW(int x, int y)
Undocumented in source.
_WSAIOW
template _WSAIOW(int x, int y)
Undocumented in source.

Variables

WSAID_GETACCEPTEXSOCKADDRS
GUID WSAID_GETACCEPTEXSOCKADDRS;
Undocumented in source.

Meta

Authors

Eugene Wissner