var eventLoop: EventLoop
The EventLoop
of the Channel
this synchronous operations view corresponds to.
func addHandler(ChannelHandler, name: String?, position: ChannelPipeline.SynchronousOperations.Position) throws
Add a handler to the pipeline.
func addHandlers(ChannelHandler..., position: ChannelPipeline.SynchronousOperations.Position) throws
Add one or more handlers to the pipeline.
func addHandlers([ChannelHandler], position: ChannelPipeline.SynchronousOperations.Position) throws
Add an array of handlers to the pipeline.
func bind(to: SocketAddress, promise: EventLoopPromise<Void>?)
Fires bind
from the tail to the head.
func close(mode: CloseMode, promise: EventLoopPromise<Void>?)
Fires close
from the tail to the head.
func connect(to: SocketAddress, promise: EventLoopPromise<Void>?)
Fires connect
from the tail to the head.
func context(handler: ChannelHandler) throws -> ChannelHandlerContext
Returns the ChannelHandlerContext
for the given handler instance if it is in the ChannelPipeline
, if it exists.
func context<Handler>(handlerType: Handler.Type) throws -> ChannelHandlerContext
Returns the ChannelHandlerContext
for the handler of given type, if one exists.
func fireChannelActive()
Fires channelActive
from the head to the tail.
func fireChannelInactive()
Fires channelInactive
from the head to the tail.
func fireChannelRead(NIOAny)
Fires channelRead
from the head to the tail.
func fireChannelReadComplete()
Fires channelReadComplete
from the head to the tail.
func fireChannelRegistered()
Fires channelRegistered
from the head to the tail.
func fireChannelUnregistered()
Fires channelUnregistered
from the head to the tail.
func fireChannelWritabilityChanged()
Fires channelWritabilityChanged
from the head to the tail.
func fireErrorCaught(Error)
Fires errorCaught
from the head to the tail.
func fireUserInboundEventTriggered(Any)
Fires userInboundEventTriggered
from the head to the tail.
func flush()
Fires flush
from the tail to the head.
func handler<Handler>(type: Handler.Type) throws -> Handler
Returns the ChannelHandler
of the given type from the ChannelPipeline
, if it exists.
func inboundBufferedBytes() -> Int
Retrieve total number of bytes buffered for inbound.
func inboundBufferedBytes(in: ChannelHandlerContext) -> Int?
Retrieve the number of inbound bytes buffered in the ChannelHandler
associated with the given ChannelHandlerContext
.
func outboundBufferedBytes() -> Int
Retrieve the total number of bytes buffered for outbound.
func outboundBufferedBytes(in: ChannelHandlerContext) -> Int?
Retrieve the number of outbound bytes buffered in the ChannelHandler
associated with the givenChannelHandlerContext
.
func read()
Fires read
from the tail to the head.
func register(promise: EventLoopPromise<Void>?)
Fires register
from the tail to the head.
func removeHandler(RemovableChannelHandler) -> EventLoopFuture<Void>
Remove a ChannelHandler
from the ChannelPipeline
.
func removeHandler(RemovableChannelHandler, promise: EventLoopPromise<Void>?)
Remove a ChannelHandler
from the ChannelPipeline
.
func removeHandler(context: ChannelHandlerContext) -> EventLoopFuture<Void>
Remove a ChannelHandler
from the ChannelPipeline
.
func removeHandler(context: ChannelHandlerContext, promise: EventLoopPromise<Void>?)
Remove a ChannelHandler
from the ChannelPipeline
.
func removeHandler(name: String) -> EventLoopFuture<Void>
Remove a ChannelHandler
from the ChannelPipeline
.
func removeHandler(name: String, promise: EventLoopPromise<Void>?)
Remove a ChannelHandler
from the ChannelPipeline
.
func triggerUserOutboundEvent(Any, promise: EventLoopPromise<Void>?)
Fires triggerUserOutboundEvent
from the tail to the head.
func write(NIOAny) -> EventLoopFuture<Void>
Fires write
from the tail to the head.
func write(NIOAny, promise: EventLoopPromise<Void>?)
Fires write
from the tail to the head.
func writeAndFlush(NIOAny) -> EventLoopFuture<Void>
Fires writeAndFlush
from the tail to the head.
func writeAndFlush(NIOAny, promise: EventLoopPromise<Void>?)
Fires writeAndFlush
from the tail to the head.