- bytesQueued
size_t bytesQueued(int priority)
Undocumented in source. Be warned that the author may not have intended to support it.
- clearQueue
void clearQueue(int priority)
Undocumented in source. Be warned that the author may not have intended to support it.
- disconnect
void disconnect(string reason, DisconnectType type)
Close a connection. If there is queued data waiting to be sent, wait until it is sent before disconnecting.
The disconnect handler will be called immediately, even when not all data has been flushed yet.
- doReceive
sizediff_t doReceive(void[] buffer)
Undocumented in source.
- doSend
sizediff_t doSend(void[] buffer)
Undocumented in source.
- onError
void onError(string reason)
Called when an error occurs on the socket.
- onReadable
void onReadable()
Called when a socket is readable.
- packetsQueued
size_t packetsQueued(int priority)
Undocumented in source. Be warned that the author may not have intended to support it.
- queuePresent
bool queuePresent(int priority)
Undocumented in source. Be warned that the author may not have intended to support it.
- send
void send(Data[] data, int priority)
Append data to the send buffer.
- updateFlags
void updateFlags()
Undocumented in source. Be warned that the author may not have intended to support it.
- __anonymous
mixin SocketMixin
Declares notifyRead and notifyWrite.
- conn
Socket conn;
The socket this class wraps.
- socket
Socket socket [@property getter]
Retrieve the socket class this class wraps.
- onReadable
void onReadable()
Undocumented in source. Be warned that the author may not have intended to support it.
- onWritable
void onWritable()
Undocumented in source. Be warned that the author may not have intended to support it.
- onError
void onError(string reason)
Undocumented in source. Be warned that the author may not have intended to support it.
- address
Address address [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- localAddress
alias localAddress = address!true
Undocumented in source.
- remoteAddress
alias remoteAddress = address!false
Undocumented in source.
- addressStr
string addressStr [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- localAddressStr
alias localAddressStr = addressStr!true
Undocumented in source.
- remoteAddressStr
alias remoteAddressStr = addressStr!false
Undocumented in source.
- daemon
bool daemon;
Don't block the process from exiting.
TODO: Not implemented with libev
- setKeepAlive
void setKeepAlive(bool enabled, int time, int interval)
Undocumented in source. Be warned that the author may not have intended to support it.
- toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
- MAX_PRIORITY
enum MAX_PRIORITY;
Undocumented in source.
- DEFAULT_PRIORITY
enum DEFAULT_PRIORITY;
Undocumented in source.
- defaultDisconnectReason
auto defaultDisconnectReason;
Undocumented in source.
- state
ConnectionState state [@property getter]
- connected
deprecated bool connected [@property getter]
Has a connection been established?
- disconnecting
deprecated bool disconnecting [@property getter]
Are we in the process of disconnecting? (Waiting for data to be flushed)
- send
void send(Data[] data, int priority)
void send(Data datum, int priority)
- disconnect
void disconnect(string reason, DisconnectType type)
Terminate the connection.
- ConnectHandler
alias ConnectHandler = void delegate()
Callback setter for when a connection has been established
(if applicable).
- handleConnect
ConnectHandler handleConnect [@property setter]
Undocumented in source.
- ReadDataHandler
alias ReadDataHandler = void delegate(Data data)
Callback setter for when new data is read.
- handleReadData
ReadDataHandler handleReadData [@property setter]
Undocumented in source.
- DisconnectHandler
alias DisconnectHandler = void delegate(string reason, DisconnectType type)
Callback setter for when a connection was closed.
- handleDisconnect
DisconnectHandler handleDisconnect [@property setter]
Undocumented in source.
- BufferFlushedHandler
alias BufferFlushedHandler = void delegate()
Callback setter for when all queued data has been sent.
- handleBufferFlushed
BufferFlushedHandler handleBufferFlushed [@property setter]
Undocumented in source.