close(mode:promise:)

Send a close event to the next outbound ChannelHandler in the ChannelPipeline. When the close event reaches the HeadChannelHandler the socket will be closed.

ChannelPipeline.swift:2009
func close(mode: CloseMode = .all, promise: EventLoopPromise<Void>?)

Parameters

mode

The CloseMode to use.

promise

The promise fulfilled when the Channel has been closed or failed if it the closing failed.