File: mg_websocket_subprotocols.md

package info (click to toggle)
civetweb 1.15%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,428 kB
  • sloc: ansic: 30,865; cpp: 1,290; sh: 494; javascript: 204; python: 143; makefile: 93; perl: 6; php: 1
file content (18 lines) | stat: -rw-r--r-- 586 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Civetweb API Reference

### `struct mg_websocket_subprotocols;`

### Fields

| Field | Type | Description |
| :--- | :--- | :--- |
|**`nb_subprotocols`**|`int`| Number of websocket sub-protocol names following (>=0). |
|**`subprotocols`**|`const char **`| Array of websocket sub-protocol names (nb_subprotocols elements). |

### Description

The structure `mg_websocket_subprotocols` is used to specify websocket sub-protocols supported by a websocket handler function.

### See Also

* [`mg_set_websocket_handler_with_subprotocols();`](mg_set_websocket_handler_with_subprotocols.md)