Skip to content

Instance Method

send(_:opcode:fin:promise:)

Send the provided data in a WebSocket frame.
func send(_ data: ByteBuffer, opcode: WebSocketOpcode = .binary, fin: Bool = true, promise: EventLoopPromise<Void>? = nil)

Parameters

data

Data to be sent.

opcode

Frame opcode.

fin

The value of the fin bit.

promise

A promise to be completed when the write is complete.