Browse Source

Merge branch 'v0.17'

Paul-Louis Ageneau 3 years ago
parent
commit
f598bf91ca
4 changed files with 23 additions and 23 deletions
  1. 4 2
      BUILDING.md
  2. 1 1
      CMakeLists.txt
  3. 9 10
      DOC.md
  4. 9 10
      pages/content/pages/reference.md

+ 4 - 2
BUILDING.md

@@ -18,10 +18,12 @@ If you only need Data Channels, the option `NO_MEDIA` allows to make the library
 
 For the sake of performance, the library should be compiled in `Release` mode if you don't plan to debug it.
 
+The CMake build exports the targets with namespace `LibDataChannel::LibDataChannel` and `LibDataChannel::LibDataChannelStatic` to link the library from another CMake project.
+
 ### POSIX-compliant operating systems (including Linux and Apple macOS)
 
 ```bash
-$ cmake -B build -DUSE_GNUTLS=1 -DUSE_NICE=0 -DCMAKE_BUILD_TYPE=Release
+$ cmake -B build -DUSE_GNUTLS=0 -DUSE_NICE=0 -DCMAKE_BUILD_TYPE=Release
 $ cd build
 $ make -j2
 ```
@@ -71,6 +73,6 @@ The option `USE_GNUTLS` allows to switch between OpenSSL (default) and GnuTLS, a
 If you only need Data Channels, the option `NO_MEDIA` removes media support. Similarly, `NO_WEBSOCKET` removes WebSocket support.
 
 ```bash
-$ make USE_GNUTLS=1 USE_NICE=0
+$ make USE_GNUTLS=0 USE_NICE=0
 ```
 

+ 1 - 1
CMakeLists.txt

@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 3.7)
 project(libdatachannel
-	VERSION 0.17.3
+	VERSION 0.17.4
 	LANGUAGES CXX)
 set(PROJECT_DESCRIPTION "C/C++ WebRTC network library featuring Data Channels, Media Transport, and WebSockets")
 

+ 9 - 10
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;
 	int pingInterval;
@@ -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)`

+ 9 - 10
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;
 	int pingInterval;
@@ -862,11 +862,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.
@@ -874,11 +873,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)`