Instance Propertyswift-nio 2.72.0NIOCore
pipeline
ChannelPipeline.swift:1501let pipeline: ChannelPipeline
Other members in extension
Types
struct RemovalToken
A
RemovalToken
is handed to aRemovableChannelHandler
when itsremoveHandler
function is invoked. ARemovableChannelHandler
is then required to remove itself from theChannelPipeline
. The removal process is finalized by handing theRemovalToken
to theChannelHandlerContext.leavePipeline
function.
Instance members
var channel: Channel
var eventLoop: EventLoop
var handler: ChannelHandler
var localAddress: SocketAddress?
let name: String
var remoteAddress: SocketAddress?
func bind(to: SocketAddress, promise: EventLoopPromise<Void>?
) Send a
bind
event to the next outboundChannelHandler
in theChannelPipeline
. When thebind
event reaches theHeadChannelHandler
aServerSocketChannel
will be bound.func close(mode: CloseMode, promise: EventLoopPromise<Void>?
) Send a
close
event to the next outboundChannelHandler
in theChannelPipeline
. When theclose
event reaches theHeadChannelHandler
the socket will be closed.func connect(to: SocketAddress, promise: EventLoopPromise<Void>?
) Send a
connect
event to the next outboundChannelHandler
in theChannelPipeline
. When theconnect
event reaches theHeadChannelHandler
aSocketChannel
will be connected.func fireChannelActive(
) Send a
channelActive
event to the next (inbound)ChannelHandler
in theChannelPipeline
.func fireChannelInactive(
) Send a
channelInactive
event to the next (inbound)ChannelHandler
in theChannelPipeline
.func fireChannelRead(NIOAny
) Send data to the next inbound
ChannelHandler
. The data should be of typeChannelInboundHandler.InboundOut
.func fireChannelReadComplete(
) Signal to the next
ChannelHandler
that a read burst has finished.func fireChannelRegistered(
) Send a
channelRegistered
event to the next (inbound)ChannelHandler
in theChannelPipeline
.func fireChannelUnregistered(
) Send a
channelUnregistered
event to the next (inbound)ChannelHandler
in theChannelPipeline
.func fireChannelWritabilityChanged(
) Send a
writabilityChanged
event to the next (inbound)ChannelHandler
in theChannelPipeline
.func fireErrorCaught(Error
) Send an error to the next inbound
ChannelHandler
.func fireUserInboundEventTriggered(Any
) Send a user event to the next inbound
ChannelHandler
.func flush(
) Send a
flush
event to the next outboundChannelHandler
in theChannelPipeline
. When theflush
event reaches theHeadChannelHandler
the data previously enqueued will be attempted to be written to the socket.func leavePipeline(removalToken: RemovalToken
) Synchronously remove the
ChannelHandler
with the givenChannelHandlerContext
.func read(
) Send a
read
event to the next outboundChannelHandler
in theChannelPipeline
. When theread
event reaches theHeadChannelHandler
the interest to read data will be signalled to theSelector
. This will subsequently – when data becomes readable – causechannelRead
events containing the data being sent through theChannelPipeline
.func register(promise: EventLoopPromise<Void>?
) Send a
register
event to the next (outbound)ChannelHandler
in theChannelPipeline
.func triggerUserOutboundEvent(Any, promise: EventLoopPromise<Void>?
) Send a user event to the next outbound
ChannelHandler
in theChannelPipeline
.func write(NIOAny, promise: EventLoopPromise<Void>?
) Send a
write
event to the next outboundChannelHandler
in theChannelPipeline
. When thewrite
event reaches theHeadChannelHandler
the data will be enqueued to be written on the nextflush
event.func writeAndFlush(NIOAny, promise: EventLoopPromise<Void>?
) Send a
write
event followed by aflush
event to the next outboundChannelHandler
in theChannelPipeline
. When thewrite
event reaches theHeadChannelHandler
the data will be enqueued to be written when theflush
also reaches theHeadChannelHandler
.