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


func nw_ws_options_set_client_request_handler(_ options: nw_protocol_options_t, _ client_queue: DispatchQueue, _ handler: @escaping nw_ws_client_request_handler_t)

See Also

Handling Server 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.

func nw_ws_response_create(nw_ws_response_status_t, UnsafePointer<Int8>?) -> nw_ws_response_t

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

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.