Skip to content

Commit

Permalink
Doc: Cosmetic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
paullouisageneau committed May 24, 2022
1 parent b24dc81 commit 27f373f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
21 changes: 10 additions & 11 deletions DOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)

Expand Down Expand Up @@ -856,23 +856,22 @@ 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.

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)`
Expand Down
21 changes: 10 additions & 11 deletions pages/content/pages/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)

Expand Down Expand Up @@ -859,23 +859,22 @@ 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.

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)`
Expand Down

0 comments on commit 27f373f

Please sign in to comment.