triggerUserOutboundEvent(_:promise:)
Trigger a custom user outbound event which will flow through the ChannelPipeline
.
@preconcurrency func triggerUserOutboundEvent(_ event: Sendable, promise: EventLoopPromise<Void>?)
Trigger a custom user outbound event which will flow through the ChannelPipeline
.
@preconcurrency func triggerUserOutboundEvent(_ event: Sendable, promise: EventLoopPromise<Void>?)
s7NIOCore22ChannelOutboundInvokerP011triggerUserC5Event_7promiseyyp_AA0G11LoopPromiseVyytGSgtF
What are these?1EZN6
import NIOCore
The core abstractions that make up SwiftNIO.
protocol ChannelOutboundInvoker
Allows users to invoke an “outbound” operation related to a Channel
that will flow through the ChannelPipeline
until it will finally be executed by the the ChannelCore
implementation.
protocol Sendable
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 ()
.
var eventLoop: EventLoop { get }
The EventLoop
which is used by this ChannelOutboundInvoker
for execution.
func bind(to: SocketAddress, promise: EventLoopPromise<Void>?)
Bind to a SocketAddress
.
func close(mode: CloseMode, promise: EventLoopPromise<Void>?)
Close the Channel
and so the connection if one exists.
func connect(to: SocketAddress, promise: EventLoopPromise<Void>?)
Connect to a SocketAddress
.
func flush()
Flush data that was previously written via write
to the remote peer.
func read()
Signal that we want to read from the Channel
once there is data ready.
func register(promise: EventLoopPromise<Void>?)
Register on an EventLoop
and so have all its IO handled.
func write(_ data: NIOAny, promise: EventLoopPromise<Void>?)
Write data to the remote peer.
func writeAndFlush(_ data: NIOAny, promise: EventLoopPromise<Void>?)
Shortcut for calling write
and flush
.
@preconcurrency func triggerUserOutboundEvent(_ event: Sendable, promise: EventLoopPromise<Void>?)