Set a callback handler to notify the user when the pong message
for the ping message sent with this context's metadata has been
received.
- Parameter queue: Set the queue on which the callback handler will
be delivered.
- Parameter handler: The callback handler that will be invoked when
the pong message has been received. The handler
may optionally return an error if the connection
fails or is cancelled before the pong is replied.
get · iOS 13.0+
selectedSubprotocol
TypeScript
get selectedSubprotocol(): (string) | null
Swift declaration
var selectedSubprotocol: String? { get }
The server's selected subprotocol.
get · iOS 13.0+
additionalServerHeaders
TypeScript
get additionalServerHeaders(): (Array<[string, string]>) | null
Swift declaration
var additionalServerHeaders: [(String, String)]? { get }
Any additional headers included in the server's response.
Create a protocol metadata object that can be used to define the
context of messages sent over a WebSocket connection.
- Parameter opcode: Set the opcode on a WebSocket frame.
get · iOS 13.0+
closeCode
TypeScript
get closeCode(): NWProtocolWebSocket_CloseCode
Swift declaration
var closeCode: NWProtocolWebSocket.CloseCode { get set }
The close code on a WebSocket frame.
set · iOS 13.0+
closeCode
TypeScript
set closeCode(value: NWProtocolWebSocket_CloseCode)
Swift declaration
var closeCode: NWProtocolWebSocket.CloseCode { get set }