func bind(context: ChannelHandlerContext, to: SocketAddress, promise: EventLoopPromise<Void>?)
Called to request that the Channel
bind to a specific SocketAddress
.
func connect(context: ChannelHandlerContext, to: SocketAddress, promise: EventLoopPromise<Void>?)
Called to request that the Channel
connect to a given SocketAddress
.
func flush(context: ChannelHandlerContext)
Called to request that the Channel
flush all pending writes. The flush operation will try to flush out all previous written messages that are pending.
func read(context: ChannelHandlerContext)
Called to request that the Channel
perform a read when data is ready. The read operation will signal that we are ready to read more data.
func register(context: ChannelHandlerContext, promise: EventLoopPromise<Void>?)
Called to request that the Channel
register itself for I/O events with its EventLoop
. This should call context.register
to forward the operation to the next _ChannelOutboundHandler
in the ChannelPipeline
or complete the EventLoopPromise
to let the caller know that the operation completed.
func write(context: ChannelHandlerContext, data: NIOAny, promise: EventLoopPromise<Void>?)
Called to request a write operation. The write operation will write the messages through the ChannelPipeline
. Those are then ready to be flushed to the actual Channel
when Channel.flush
or ChannelHandlerContext.flush
is called.