Hook to perform that actual operation of writing to a channel
Hook to perform that actual operation of writing to a channel
ABSTRACT MEMBERS *
Get the current connection status.
Get the current connection status.
how many bytes have been received on the connection in total
how many bytes have been received on the connection in total
close is called with notify: false when reacting to the handler's termination NOTE - This is only called by the worker, because otherwise the worker does not know about the connection being closed
The WriteBuffer calls this if it has been signaled to disconnect and finishes writing any existing partial buffer
The WriteBuffer calls this if it has been signaled to disconnect and finishes writing any existing partial buffer
Terminate the connection
Terminate the connection
This should be called when it's time to disconnect the connection, but we wish to finish writing any existing partial buffer.
This should be called when it's time to disconnect the connection, but we wish to finish writing any existing partial buffer. We do this because any levels higher up already consider any data in a partial buffer to be sent, so we don't want to disconnect until we fullfil that promise.
The main entry point for allowing a connection handler to write data to the connection.
The main entry point for allowing a connection handler to write data to the connection. Handlers cannot write data whenever they please, instead they must initiate a write request. The worker then calls this method to fullfill the request and provide the handler with a DataOutBuffer to which it can write data.
The id of the underlying connection.
The id of the underlying connection. This is different from a WorkerItem's id.
Returns true if data can be written to the connection.
Returns true if data can be written to the connection. This will generally only return false if the write buffer is full or the connection has been terminated.
Returns a timestamp, in milliseconds of when the last time data was read on the connection
Returns a timestamp, in milliseconds of when the last time data was read on the connection
The address of the remote host for this connection, if connected
The address of the remote host for this connection, if connected
replace the existing handler with a new one.
replace the existing handler with a new one. The old handler is terminated
with the Disconnect
cause and connected is called on the new handler if
the connection is connected. No action is taken if the connection is closed
How long, in milliseconds, since the connection was opened
How long, in milliseconds, since the connection was opened
Gets the worker this connection is bound to.
Gets the worker this connection is bound to.