Required Instance Methodswift-nio 2.81.0NIOCore

triggerUserOutboundEvent(context:event:promise:)

Called when an user outbound event is triggered.

ChannelHandler.swift:127
func triggerUserOutboundEvent(context: ChannelHandlerContext, event: Any, promise: EventLoopPromise<Void>?)

Parameters

context

The ChannelHandlerContext which this ChannelHandler belongs to.

event

The triggered event.

promise

The EventLoopPromise which should be notified once the operation completes, or nil if no notification should take place.

This should call context.triggerUserOutboundEvent to forward the operation to the next _ChannelOutboundHandler in the ChannelPipeline or complete the EventLoopPromise to let the caller know that the operation completed.