Instance Method (Default implementation)swift-nio 2.81.0NIOCore
bind(context:to:promise:)
ChannelHandler.swift:240func bind(context: ChannelHandlerContext, to address: SocketAddress, promise: EventLoopPromise<Void>?)
func bind(context: ChannelHandlerContext, to address: SocketAddress, promise: EventLoopPromise<Void>?)
s7NIOCore23_ChannelOutboundHandlerPAAE4bind7context2to7promiseyAA0bD7ContextC_AA13SocketAddressOAA16EventLoopPromiseVyytGSgtF
What are these?51IQM
import NIOCore
The core abstractions that make up SwiftNIO.
protocol _ChannelOutboundHandler : ChannelHandler
Untyped ChannelHandler
which handles outbound I/O events or intercept an outbound I/O operation.
final class ChannelHandlerContext
Every ChannelHandler
has – when added to a ChannelPipeline
– a corresponding ChannelHandlerContext
which is the way ChannelHandler
s can interact with other ChannelHandler
s in the pipeline.
enum SocketAddress
Represent a socket address to which we may want to connect or bind.
struct EventLoopPromise<Value>
A promise to provide a result later.
typealias Void = ()
The return type of functions that don’t explicitly specify a return type, that is, an empty tuple ()
.
func bind(context: ChannelHandlerContext, to: SocketAddress, promise: EventLoopPromise<Void>?)
Called to request that the Channel
bind to a specific SocketAddress
.
func close(context: ChannelHandlerContext, mode: CloseMode, promise: EventLoopPromise<Void>?)
func connect(context: ChannelHandlerContext, to address: SocketAddress, promise: EventLoopPromise<Void>?)
func flush(context: ChannelHandlerContext)
func read(context: ChannelHandlerContext)
func register(context: ChannelHandlerContext, promise: EventLoopPromise<Void>?)
func triggerUserOutboundEvent(context: ChannelHandlerContext, event: Any, promise: EventLoopPromise<Void>?)
func write(context: ChannelHandlerContext, data: NIOAny, promise: EventLoopPromise<Void>?)