func channelActive(context: ChannelHandlerContext)
Called when the Channel
has become active, and is able to send and receive data.
func channelRead(context: ChannelHandlerContext, data: NIOAny)
Called when some data has been read from the remote peer.
func channelReadComplete(context: ChannelHandlerContext)
Called when the Channel
has completed its current read loop, either because no more data is available to read from the transport at this time, or because the Channel
needs to yield to the event loop to process other I/O events for other Channel
s. If ChannelOptions.autoRead
is false
no further read attempt will be made until ChannelHandlerContext.read
or Channel.read
is explicitly called.
func channelRegistered(context: ChannelHandlerContext)
Called when the Channel
has successfully registered with its EventLoop
to handle I/O.
func channelUnregistered(context: ChannelHandlerContext)
Called when the Channel
has unregistered from its EventLoop
, and so will no longer be receiving I/O events.
func channelWritabilityChanged(context: ChannelHandlerContext)
The writability state of the Channel
has changed, either because it has buffered more data than the writability high water mark, or because the amount of buffered data has dropped below the writability low water mark. You can check the state with Channel.isWritable
.
func errorCaught(context: ChannelHandlerContext, error: Error)
An error was encountered earlier in the inbound ChannelPipeline
.
func userInboundEventTriggered(context: ChannelHandlerContext, event: Any)
Called when a user inbound event has been triggered.