how many bytes have been received on the connection in total
how many bytes have been received on the connection in total
how many bytes have been sent on the connection in total
how many bytes have been sent on the connection in total
Disable all read events to the connection.
Disable all read events to the connection. Once disabled, the connection handler will stop receiving incoming data. This can allow handlers to provide backpressure to the remote host.
Terminate the connection
Re-enable reads, if they were previously disabled
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
Returns a timestamp, in milliseconds of when the last time data was written on the connection
Returns a timestamp, in milliseconds of when the last time data was written 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
Get the current connection status.
Get the current connection status.
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.
todo: should be a WorkerRef. Also is this even needed anymore?
Write some data to the connection.
Write some data to the connection. Because connections are non-blocking, it's possible that the underlying write buffer will fill up and not all of the DataBuffer will be written. When that occurs, the endpoint will keep a copy of the unwritten data until the buffer empties.
This is passed to handlers to give them a way to synchronously write to the connection. Services wrap this