close0(error:mode:promise:)
Close the Channel
.
func close0(error: Error, mode: CloseMode, promise: EventLoopPromise<Void>?)
Close the Channel
.
func close0(error: Error, mode: CloseMode, promise: EventLoopPromise<Void>?)
s7NIOCore11ChannelCoreP6close05error4mode7promiseys5Error_p_AA9CloseModeOAA16EventLoopPromiseVyytGSgtF
What are these?3CCW1
import NIOCore
The core abstractions that make up SwiftNIO.
protocol ChannelCore : AnyObject
The core Channel
methods that are for internal use of the Channel
implementation only.
protocol Error : Sendable
A type representing an error value that can be thrown.
enum CloseMode
Specify what kind of close operation is requested.
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 bind0(to: SocketAddress, promise: EventLoopPromise<Void>?)
Bind to a SocketAddress
.
func channelRead0(_ data: NIOAny)
Called when data was read from the Channel
but it was not consumed by any ChannelInboundHandler
in the ChannelPipeline
.
func connect0(to: SocketAddress, promise: EventLoopPromise<Void>?)
Connect to a SocketAddress
.
func errorCaught0(error: Error)
Called when an inbound error was encountered but was not consumed by any ChannelInboundHandler
in the ChannelPipeline
.
func flush0()
Try to flush out all previous written messages that are pending.
func localAddress0() throws -> SocketAddress
Returns the local bound SocketAddress
.
func read0()
Request that the Channel
perform a read when data is ready.
func register0(promise: EventLoopPromise<Void>?)
Register with the EventLoop
to receive I/O notifications.
func registerAlreadyConfigured0(promise: EventLoopPromise<Void>?)
Register channel as already connected or bound socket.
func remoteAddress0() throws -> SocketAddress
Return the connected SocketAddress
.
func triggerUserOutboundEvent0(_ event: Any, promise: EventLoopPromise<Void>?)
Trigger an outbound event.
func write0(_ data: NIOAny, promise: EventLoopPromise<Void>?)
Write the given data to the outbound buffer.