AbstractStream

TCP Client

Constructors

this
this(Selector loop, AddressFamily family, size_t bufferSize)
Undocumented in source.

Members

Functions

cancelWrite
void cancelWrite()
Undocumented in source. Be warned that the author may not have intended to support it.
doConnect
void doConnect(Address addr)
Undocumented in source. Be warned that the author may not have intended to support it.
onDisconnected
void onDisconnected()
Undocumented in source. Be warned that the author may not have intended to support it.
onWriteDone
void onWriteDone()
Undocumented in source. Be warned that the author may not have intended to support it.
tryRead
bool tryRead()
tryWrite
ptrdiff_t tryWrite(ubyte[] data)

Try to write a block of data.

tryWriteAll
void tryWriteAll(ubyte[] data)

Warning: It will try the best to write all the data. TODO: create a test

Variables

_family
AddressFamily _family;
Undocumented in source.
_isConnected
bool _isConnected;
Undocumented in source.
_writeQueue
WriteBufferQueue _writeQueue;
Undocumented in source.
canWriteAgain
bool canWriteAgain;
Undocumented in source.
dataReceivedHandler
DataReceivedHandler dataReceivedHandler;

Warning: The received data is stored a inner buffer. For a data safe, you would make a copy of it.

disconnectionHandler
SimpleEventHandler disconnectionHandler;
Undocumented in source.
isWriteCancelling
bool isWriteCancelling;
Undocumented in source.
writeRetryLimit
int writeRetryLimit;
Undocumented in source.

Inherited Members

From AbstractSocketChannel

_isWritting
bool _isWritting;
Undocumented in source.
isBusy
bool isBusy()
Undocumented in source. Be warned that the author may not have intended to support it.
socket
Socket socket [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
socket
Socket socket [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
_socket
Socket _socket;
Undocumented in source.
close
void close()
Undocumented in source. Be warned that the author may not have intended to support it.
getOption
int getOption(SocketOptionLevel level, SocketOption option, void[] result)

Get a socket option.

getOption
int getOption(SocketOptionLevel level, SocketOption option, int32_t result)

Common case of getting integer and boolean options.

getOption
int getOption(SocketOptionLevel level, SocketOption option, Linger result)

Get the linger option.

getOption
void getOption(SocketOptionLevel level, SocketOption option, Duration result)

Get a timeout (duration) option.

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

Set a socket option.

setOption
void setOption(SocketOptionLevel level, SocketOption option, int32_t value)

Common case for setting integer and boolean options.

setOption
void setOption(SocketOptionLevel level, SocketOption option, Linger value)

Set the linger option.

setOption
void setOption(SocketOptionLevel level, SocketOption option, Duration value)
Undocumented in source. Be warned that the author may not have intended to support it.
remoteAddress
Address remoteAddress [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
_remoteAddress
Address _remoteAddress;
Undocumented in source.
localAddress
Address localAddress [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
_localAddress
Address _localAddress;
Undocumented in source.
setRead
void setRead(size_t bytes)
Undocumented in source. Be warned that the author may not have intended to support it.
readLen
size_t readLen;
Undocumented in source.
start
void start()
Undocumented in source.
onWriteDone
void onWriteDone()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta