diff --git a/DOC.md b/DOC.md index 7111664f6..c2e79fc76 100644 --- a/DOC.md +++ b/DOC.md @@ -777,7 +777,7 @@ int rtcCreateWebSocket(const char *url) int rtcCreateWebSocketEx(const char *url, const rtcWsConfiguration *config) typedef struct { - bool disableTlsVerification; // if true, disable TLS certificate verification + bool disableTlsVerification; const char **protocols; int protocolsCount; } rtcWsConfiguration; @@ -789,7 +789,7 @@ Arguments: - `url`: a null-terminated string representing the fully-qualified URL to open. - `config`: a structure with the following parameters: - - `bool disableTlsVerification`: if true, don't verify the TLS certificate, else try to verify it if possible + - `disableTlsVerification`: if true, don't verify the TLS certificate, else try to verify it if possible - `protocols` (optional): an array of pointers on null-terminated protocol names (NULL if unused) - `protocolsCount` (optional): number of URLs in the array pointed by `protocols` (0 if unused) @@ -856,11 +856,10 @@ int rtcCreateWebSocketServer(const rtcWsServerConfiguration *config, rtcWebSocke typedef struct { uint16_t port; bool enableTls; - const char *certificatePemFile; // NULL for autogenerated certificate - const char *keyPemFile; // NULL for autogenerated certificate - const char *keyPemPass; // NULL if no pass + const char *certificatePemFile; + const char *keyPemFile; + const char *keyPemPass; } rtcWsServerConfiguration; - ``` Creates a new WebSocket server. @@ -868,11 +867,11 @@ Creates a new WebSocket server. Arguments: - `config`: a structure with the following parameters: - - `uint16_t port`: the port to listen on (if 0, automatically select an available port) - - `bool enableTls`: if true, enable the TLS layer (WSS) - - `const char *certificatePemFile`: PEM certificate or path of the file containing the PEM certificate (`NULL` for an autogenerated certificate) - - `const char *keyPemFile`: PEM key or path of the file containing the PEM key (`NULL` for an autogenerated certificate) - - `const char *keyPemPass`: PEM key file passphrase (NULL if no passphrase) + - `port`: the port to listen on (if 0, automatically select an available port) + - `enableTls`: if true, enable the TLS layer (WSS) + - `certificatePemFile` (optional): PEM certificate or path of the file containing the PEM certificate (`NULL` for an autogenerated certificate) + - `keyPemFile` (optional): PEM key or path of the file containing the PEM key (`NULL` for an autogenerated certificate) + - `keyPemPass` (optional): PEM key file passphrase (NULL if no passphrase) - `cb`: the callback for incoming client WebSocket connections (must not be `NULL`) `cb` must have the following signature: `void rtcWebSocketClientCallbackFunc(int wsserver, int ws, void *user_ptr)` diff --git a/pages/content/pages/reference.md b/pages/content/pages/reference.md index b87d8aadd..45445e103 100644 --- a/pages/content/pages/reference.md +++ b/pages/content/pages/reference.md @@ -780,7 +780,7 @@ int rtcCreateWebSocket(const char *url) int rtcCreateWebSocketEx(const char *url, const rtcWsConfiguration *config) typedef struct { - bool disableTlsVerification; // if true, disable TLS certificate verification + bool disableTlsVerification; const char **protocols; int protocolsCount; } rtcWsConfiguration; @@ -792,7 +792,7 @@ Arguments: - `url`: a null-terminated string representing the fully-qualified URL to open. - `config`: a structure with the following parameters: - - `bool disableTlsVerification`: if true, don't verify the TLS certificate, else try to verify it if possible + - `disableTlsVerification`: if true, don't verify the TLS certificate, else try to verify it if possible - `protocols` (optional): an array of pointers on null-terminated protocol names (NULL if unused) - `protocolsCount` (optional): number of URLs in the array pointed by `protocols` (0 if unused) @@ -859,11 +859,10 @@ int rtcCreateWebSocketServer(const rtcWsServerConfiguration *config, rtcWebSocke typedef struct { uint16_t port; bool enableTls; - const char *certificatePemFile; // NULL for autogenerated certificate - const char *keyPemFile; // NULL for autogenerated certificate - const char *keyPemPass; // NULL if no pass + const char *certificatePemFile; + const char *keyPemFile; + const char *keyPemPass; } rtcWsServerConfiguration; - ``` Creates a new WebSocket server. @@ -871,11 +870,11 @@ Creates a new WebSocket server. Arguments: - `config`: a structure with the following parameters: - - `uint16_t port`: the port to listen on (if 0, automatically select an available port) - - `bool enableTls`: if true, enable the TLS layer (WSS) - - `const char *certificatePemFile`: PEM certificate or path of the file containing the PEM certificate (`NULL` for an autogenerated certificate) - - `const char *keyPemFile`: PEM key or path of the file containing the PEM key (`NULL` for an autogenerated certificate) - - `const char *keyPemPass`: PEM key file passphrase (NULL if no passphrase) + - `port`: the port to listen on (if 0, automatically select an available port) + - `enableTls`: if true, enable the TLS layer (WSS) + - `certificatePemFile` (optional): PEM certificate or path of the file containing the PEM certificate (`NULL` for an autogenerated certificate) + - `keyPemFile` (optional): PEM key or path of the file containing the PEM key (`NULL` for an autogenerated certificate) + - `keyPemPass` (optional): PEM key file passphrase (NULL if no passphrase) - `cb`: the callback for incoming client WebSocket connections (must not be `NULL`) `cb` must have the following signature: `void rtcWebSocketClientCallbackFunc(int wsserver, int ws, void *user_ptr)`