Browse Source

Doc: Cosmetic fixes

Paul-Louis Ageneau 3 years ago
parent
commit
27f373fd2a
2 changed files with 20 additions and 22 deletions
  1. 10 11
      DOC.md
  2. 10 11
      pages/content/pages/reference.md

+ 10 - 11
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)`

+ 10 - 11
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)`