Function

nw_ws_response_create(_:_:)

Initializes a WebSocket server response with a status and selected subprotocol.

Declaration

func nw_ws_response_create(_ status: nw_ws_response_status_t, _ selected_subprotocol: UnsafePointer<Int8>?) -> nw_ws_response_t

See Also

Handling Server Handshakes

func nw_ws_options_set_client_request_handler(nw_protocol_options_t, DispatchQueue, nw_ws_client_request_handler_t)

Sets a handler to react to as a server to inbound WebSocket client handshakes.

typealias nw_ws_client_request_handler_t

A handler that delivers inbound client handshake requests.

typealias nw_ws_request_t

A WebSocket handshake request sent from a client to a server.

typealias nw_ws_subprotocol_enumerator_t

A block that enumerates the supported subprotocols in a WebSocket client request.

typealias nw_ws_additional_header_enumerator_t

A block that enumerates additional HTTP headers in a WebSocket client request.

typealias nw_ws_response_t

A WebSocket handshake reponse sent from a server to a client.

struct nw_ws_response_status_t

Status values that are sent with a WebSocket server response.

func nw_ws_response_get_status(nw_ws_response_t?) -> nw_ws_response_status_t

Accesses the status of a WebSocket server response.

func nw_ws_response_get_selected_subprotocol(nw_ws_response_t) -> UnsafePointer<Int8>?

Accesses the selected subprotocol in a WebSocket server response.