outboundBufferedBytes
Retrieve the total number of bytes buffered for outbound.
func outboundBufferedBytes() -> Int
Retrieve the total number of bytes buffered for outbound.
func outboundBufferedBytes() -> Int
s7NIOCore15ChannelPipelineC21SynchronousOperationsV21outboundBufferedBytesSiyF
What are these?5R3H1
import NIOCore
The core abstractions that make up SwiftNIO.
struct SynchronousOperations
A view of a ChannelPipeline
which may be used to invoke synchronous operations.
final class ChannelPipeline
A list of ChannelHandler
s that handle or intercept inbound events and outbound operations of a Channel
. ChannelPipeline
implements an advanced form of the Intercepting Filter pattern to give a user full control over how an event is handled and how the ChannelHandler
s in a pipeline interact with each other.
@frozen struct Int
A signed integer value type.
var eventLoop: EventLoop { get }
The EventLoop
of the Channel
this synchronous operations view corresponds to.
func addHandler(_ handler: ChannelHandler, name: String? = nil, position: ChannelPipeline.Position = .last) throws
Add a handler to the pipeline.
func addHandlers(_ handlers: ChannelHandler..., position: ChannelPipeline.Position = .last) throws
Add one or more handlers to the pipeline.
func addHandlers(_ handlers: [ChannelHandler], position: ChannelPipeline.Position = .last) throws
Add an array of handlers to the pipeline.
func bind(to address: SocketAddress, promise: EventLoopPromise<Void>?)
Fires bind
from the tail to the head.
func close(mode: CloseMode = .all, promise: EventLoopPromise<Void>?)
Fires close
from the tail to the head.
func connect(to address: 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 where Handler : ChannelHandler
Returns the ChannelHandlerContext
for the handler of given type, if one exists.
func context(name: String) throws -> ChannelHandlerContext
Returns the ChannelHandlerContext
for the handler with the given name, 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(_ data: 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: Error)
Fires errorCaught
from the head to the tail.
func fireUserInboundEventTriggered(_ event: 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 where Handler : ChannelHandler
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 context: ChannelHandlerContext) -> Int?
Retrieve the number of inbound bytes buffered in the ChannelHandler
associated with the given ChannelHandlerContext
.
func outboundBufferedBytes(in context: 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.
@preconcurrency func removeHandler(_ handler: RemovableChannelHandler) -> EventLoopFuture<Void>
Remove a ChannelHandler
from the ChannelPipeline
.
func removeHandler(context: ChannelHandlerContext) -> EventLoopFuture<Void>
Remove a ChannelHandler
from the ChannelPipeline
.
func triggerUserOutboundEvent(_ event: Any, promise: EventLoopPromise<Void>?)
Fires triggerUserOutboundEvent
from the tail to the head.
func write(_ data: NIOAny, promise: EventLoopPromise<Void>?)
Fires write
from the tail to the head.
func writeAndFlush(_ data: NIOAny, promise: EventLoopPromise<Void>?)
Fires writeAndFlush
from the tail to the head.