StreamSocket

Undocumented in source.

Constructors

this
this(AddressFamily af)

Create a socket.

Members

Functions

accept
ConnectedSocket accept()

Accept an incoming connection.

bind
void bind(Endpoint endpoint)

Associate a local address with this socket.

Inherited Members

From Socket

Shutdown
enum Shutdown

How a socket is shutdown.

Shutdown
enum Shutdown

How a socket is shutdown.

handle_
SocketType handle_;

Socket handle.

family
AddressFamily family;

Address family.

handle
inout(SocketType) handle [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
~this
~this()

Closes the socket and calls the destructor on itself.

getOption
int getOption(SocketOptionLevel level, SocketOption option, void[] result)
int getOption(SocketOptionLevel level, SocketOption option, size_t result)
int getOption(SocketOptionLevel level, SocketOption option, Linger result)
int getOption(SocketOptionLevel level, SocketOption option, Duration result)

Get a socket option.

setOption
void setOption(SocketOptionLevel level, SocketOption option, void[] value)
void setOption(SocketOptionLevel level, SocketOption option, size_t value)
void setOption(SocketOptionLevel level, SocketOption option, Linger value)
void setOption(SocketOptionLevel level, SocketOption option, Duration value)

Set a socket option.

blocking
inout(bool) blocking [@property getter]
blocking
bool blocking [@property setter]
addressFamily
AddressFamily addressFamily [@property getter]
isAlive
bool isAlive [@property getter]
shutdown
void shutdown(Shutdown how)

Disables sends and/or receives.

close
void close()

Immediately drop any connections and release socket resources. Calling $(D_PSYMBOL shutdown) before $(D_PSYMBOL close) is recommended for connection-oriented sockets. The $(D_PSYMBOL Socket) object is no longer usable after $(D_PSYMBOL close).

listen
void listen(int backlog)

Listen for an incoming connection. $(D_PSYMBOL bind) must be called before you can $(D_PSYMBOL listen).

opCmp
int opCmp(size_t that)

Compare handles.

From ConnectionOrientedSocket

Flag
enum Flag

Flags may be OR'ed together.

Flags
alias Flags = BitFlags!Flag
Undocumented in source.

Meta