Constructor used by a ServerSocket for new connections
Append data to the send buffer.
Returns the number of queued bytes at the given priority.
Cancel all queued Data packets with the given priority. Does not cancel any partially-sent Data.
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.
Called when an error occurs on the socket.
Called when a socket is readable.
Returns the number of queued Data at the given priority.
Returns true if there are any queued Data which have not yet begun to be sent.
Append data to the send buffer.
Callback setter for when all queued data has been sent.
Callback for when a connection has been established.
Callback for when a connection was closed.
Callback for incoming data. Data will not be received unless this handler is set.
Get connection state.
Returns true if any queues have pending data.
The send buffers.
Whether the first item from this queue (if any) has been partially sent (and thus can't be canceled).
Declares notifyRead and notifyWrite.
The socket this class wraps.
Retrieve the socket class this class wraps.
Don't block the process from exiting, even if the socket is ready to receive data. TODO: Not implemented with libev
Don't block the process from exiting, even if the socket is ready to send data. TODO: Not implemented with libev
Enable TCP keep-alive on the socket with the given settings.
Returns a string containing the class name, address, and file descriptor.
send queues data for sending in one of five queues, indexed by a numeric priority. MAX_PRIORITY is the highest (least urgent) priority index. DEFAULT_PRIORITY is the default priority
This is the default value for the disconnect reason string parameter.
Get connection state.
Has a connection been established?
Are we in the process of disconnecting? (Waiting for data to be flushed)
Queue Data for sending.
Terminate the connection.
Callback setter for when a connection has been established (if applicable).
Callback setter for when new data is read.
Callback setter for when a connection was closed.
Callback setter for when all queued data has been sent.
Implementation of IConnection using a socket. Implements receiving data when readable and sending queued data when writable.