1# Civetweb API Reference
2
3### `mg_connect_client_secure( client_options, error_buffer, error_buffer_size );`
4
5### Parameters
6
7| Parameter | Type | Description |
8| :--- | :--- | :--- |
9|**`client_options`**|`const struct mg_client_options *`|Settings about the server connection|
10|**`error_buffer`**|`char *`|Buffer to store an error message|
11|**`error_buffer_size`**|`size_t`|Size of the error message buffer including the NUL terminator|
12
13### Return Value
14
15| Type | Description |
16| :--- | :--- |
17|`struct mg_connection *`||
18
19### Description
20
21The function `mg_connect_client_secure()` creates a secure connection with a server. The information about the connection and server is passed in a structure and an error message may be returned in a local buffer. The function returns a pointer to a `struct mg_connection` structure when successful and NULL otherwise.
22
23Please note that IPv6 communication is supported by Civetweb, but only if the use of IPv6 was enabled at compile time. The check while running a program if IPv6 communication is possible you can call [`mg_check_feature()`](mg_check_feature.md) with the `USE_IPV6` parameter to check if IPv6 communications can be used.
24
25### See Also
26
27* [`struct mg_client_options;`](mg_client_options.md)
28* [`mg_check_feature();`](mg_check_feature.md)
29* [`mg_connect_client();`](mg_connect_client.md)
30* [`mg_connect_websocket_client();`](mg_connect_websocket_client.md)
31