]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | # Civetweb API Reference |
2 | ||
3 | ### ~~`mg_get_ports( ctx, size, ports, ssl );`~~ | |
4 | ||
5 | ### Parameters | |
6 | ||
7 | | Parameter | Type | Description | | |
8 | | :--- | :--- | :--- | | |
9 | |**`ctx`**|`const struct mg_context *`|| | |
10 | |**`size`**|`size_t`|The number of ports which can be stored in the buffer| | |
11 | |**`ports`**|`int *`|Buffer for storage of the port numbers| | |
12 | |**`ssl`**|`int *`|Buffer used to store if SSL is used for the ports| | |
13 | ||
14 | ### Return Value | |
15 | ||
16 | | Type | Description | | |
17 | | :--- | :--- | | |
18 | |`size_t`|The number of ports stored in the buffer| | |
19 | ||
20 | ### Description | |
21 | ||
22 | This function is deprecated. Use [`mg_get_server_ports()`](mg_get_server_ports.md) instead. | |
23 | ||
24 | The function `mg_get_ports()` returns a list of ports the Civetweb server is listening on. The port numbers are stored in a buffer of integers which is supplied by the calling party. The function also stores information if SSL is used on the ports. This information is stored in a second buffer which should be capable of storing the same amount of items as the ports buffer. | |
25 | ||
26 | The function returns the number of ports actually stored in the buffer. | |
27 | ||
28 | ### See Also | |
29 | ||
30 | * [`struct mg_server_ports;`](mg_server_ports.md) | |
31 | * [`mg_get_server_ports();`](mg_get_server_ports.md) |