TCPClient

TCP Client

Constructors

this
this(EventLoop loop, AddrFamily family, uint bufferSize)
Undocumented in source.
this
this(EventLoop loop, Socket socket, uint bufferSize)
Undocumented in source.

Members

Functions

clearQueue
clearQueue()
Undocumented in source. Be warned that the author may not have intended to support it.
close
void close()
Undocumented in source. Be warned that the author may not have intended to support it.
connect
void connect(Address addr)
Undocumented in source. Be warned that the author may not have intended to support it.
flush
flush()
Undocumented in source. Be warned that the author may not have intended to support it.
flush
flush()
Undocumented in source. Be warned that the author may not have intended to support it.
onRead
void onRead()
Undocumented in source. Be warned that the author may not have intended to support it.
onRead
void onRead(uint len)
Undocumented in source. Be warned that the author may not have intended to support it.
onWrite
onWrite(uint len)

Called by selector after data sent

reconnect
void reconnect(Address addr)
Undocumented in source. Be warned that the author may not have intended to support it.
start
void start()
Undocumented in source. Be warned that the author may not have intended to support it.
tryWrite
size_t tryWrite(void[] data)

Try to write a block of data.

write
void write(void[] data)

safe for big data sending

Mixins

__anonymous
mixin Forward!"_socket"
Undocumented in source.

Properties

bufferSize
bufferSize [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isConnected
isConnected [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_connected
bool _connected;
Undocumented in source.
_rBuf
ubyte[] _rBuf;
Undocumented in source.
_rBuf
const(ubyte)[] _rBuf;
Undocumented in source.
cancelWriting
bool cancelWriting;
Undocumented in source.
onClosed
SimpleHandler onClosed;
Undocumented in source.
onConnected
ConnectionHandler onConnected;
Undocumented in source.
onDisconnected
SimpleHandler onDisconnected;
Undocumented in source.
onReceived
RecvHandler onReceived;

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

Inherited Members

From SocketChannel

onError
ErrorHandler onError;
Undocumented in source.
flags
WF flags;
Undocumented in source.
type
WatcherType type;
Undocumented in source.
_isReg
bool _isReg;
Undocumented in source.
handle
handle [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
socket
socket [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isRegistered
bool isRegistered [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
onRead
void onRead()
Undocumented in source. Be warned that the author may not have intended to support it.
close
void close()
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.
_loop
EventLoop _loop;
Undocumented in source.
_socket
Socket _socket;
Undocumented in source.

Meta