Sets a close code on a WebSocket message.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
Framework
- Network
Declaration
void nw_ws_metadata_set_close_code(nw _protocol _metadata _t metadata, nw _ws _close _code _t close_code);
Sets a close code on a WebSocket message.
SDKs
Framework
void nw_ws_metadata_set_close_code(nw _protocol _metadata _t metadata, nw _ws _close _code _t close_code);
nw _protocol _metadata _is _ws
Checks whether a metadata object represents a WebSocket message.
nw _ws _create _metadata
Initializes a WebSocket message with a specific type code.
nw _ws _metadata _get _opcode
Checks the type code on a WebSocket message.
nw _ws _opcode _t
Types of messages that you send and receive on a WebSocket connection.
nw _ws _metadata _get _close _code
Accesses the close code on a WebSocket message.
nw _ws _close _code _t
Types of codes used upon closing a WebSocket connection.
nw _ws _metadata _set _pong _handler
Sets a handler on a Ping message to be invoked when the corresponding Pong message is received.
nw _ws _pong _handler _t
A handler that indicates that a Pong message has been received for a previously sent Ping message, or that an error was encountered.
nw _ws _metadata _copy _server _response
Accesses the WebSocket server's response sent during the handshake.