more.net.sock

Contains a platform independent socket library.

Use SocketHandle to represent a handle to a socket.

This file should contain the public platform independent interface to the socket library. If you want platform dependent definitions, you can import more.net.os.<platform>.sock.

Anything that can be exposed as platform-independent should be defined in this module.

Public Imports

more.os.windows.core
public import more.os.windows.core : lastError;
more.os.posix.core
public import more.os.posix.core : lastError;

Members

Aliases

Blocking
alias Blocking = Flag!"blocking"
Undocumented in source.
SocketHandle
alias SocketHandle = platform_core.FileHandle
Undocumented in source.

Enums

AddressFamily
enum AddressFamily
Undocumented in source.
Protocol
enum Protocol
Undocumented in source.
SocketType
enum SocketType
Undocumented in source.

Functions

accept
auto accept(SocketHandle sock, T* addr)
Undocumented in source. Be warned that the author may not have intended to support it.
bind
auto bind(SocketHandle sock, const(T)* addr)
Undocumented in source. Be warned that the author may not have intended to support it.
closesocket
SockResult closesocket(SocketHandle )
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
closesocket
int closesocket(SocketHandle handle)
Undocumented in source. Be warned that the author may not have intended to support it.
connect
auto connect(SocketHandle sock, const(T)* addr)
Undocumented in source. Be warned that the author may not have intended to support it.
createsocket
SocketHandle createsocket(AddressFamily family, SocketType type, Protocol protocol)
Undocumented in source. Be warned that the author may not have intended to support it.
htonl
T htonl(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
htons
T htons(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
htons
ushort htons(ushort value)
Undocumented in source. Be warned that the author may not have intended to support it.
ntohl
T ntohl(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
ntohs
T ntohs(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
recv
auto recv(SocketHandle sock, T* buffer, uint len, uint flags)
Undocumented in source. Be warned that the author may not have intended to support it.
recv
auto recv(SocketHandle sock, T[] buffer, uint flags)
Undocumented in source. Be warned that the author may not have intended to support it.
recvfrom
auto recvfrom(SocketHandle sock, T[] buffer, uint flags, U* from)
Undocumented in source. Be warned that the author may not have intended to support it.
select
int select(int ignore, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, platform_sock.timeval* timeout)
Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
send
auto send(SocketHandle sock, const(T)* buffer, size_t len, uint flags)
Undocumented in source. Be warned that the author may not have intended to support it.
send
auto send(SocketHandle sock, const(T)[] buffer, uint flags)
Undocumented in source. Be warned that the author may not have intended to support it.
sendto
auto sendto(SocketHandle sock, const(T)[] buffer, uint flags, const(U)* to)
Undocumented in source. Be warned that the author may not have intended to support it.
setMode
passfail setMode(SocketHandle sock, Blocking blocking)
Undocumented in source. Be warned that the author may not have intended to support it.
toUshort
ushort toUshort(ushort value)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

Port
struct Port
Undocumented in source.
SendResult
struct SendResult
Undocumented in source.
SockLengthResult
struct SockLengthResult
Undocumented in source.
SockResult
struct SockResult
Undocumented in source.
SocketHandle
struct SocketHandle
Undocumented in source.
fd_set
struct fd_set
Undocumented in source.
fd_set_storage
struct fd_set_storage(size_t size)
Undocumented in source.
in6_addr
struct in6_addr
Undocumented in source.
in_addr
struct in_addr
Undocumented in source.
sockaddr
struct sockaddr
Undocumented in source.
sockaddr_in
struct sockaddr_in
Undocumented in source.
sockaddr_in6
struct sockaddr_in6
Undocumented in source.

Unions

inet_addr
union inet_addr
Undocumented in source.
inet_sockaddr
union inet_sockaddr
Undocumented in source.

Meta