|
@@ -120,13 +120,27 @@ The `proxyServer` URI, if present, must match the format `[("http"|"socks5") (":
|
|
|
|
|
|
If the username or password of an URI contains reserved special characters, they must be percent-encoded. In particular, ":" must be encoded as "%3A" and "@" must by encoded as "%40".
|
|
|
|
|
|
+#### rtcClosePeerConnection
|
|
|
+
|
|
|
+```
|
|
|
+int rtcClosePeerConnection(int pc)
|
|
|
+```
|
|
|
+
|
|
|
+Closes the Peer Connection.
|
|
|
+
|
|
|
+Arguments:
|
|
|
+
|
|
|
+- `pc`: the Peer Connection identifier
|
|
|
+
|
|
|
+Return value: `RTC_ERR_SUCCESS` or a negative error code
|
|
|
+
|
|
|
#### rtcDeletePeerConnection
|
|
|
|
|
|
```
|
|
|
int rtcDeletePeerConnection(int pc)
|
|
|
```
|
|
|
|
|
|
-Deletes the specified Peer Connection.
|
|
|
+Deletes the Peer Connection.
|
|
|
|
|
|
Arguments:
|
|
|
|
|
@@ -134,7 +148,7 @@ Arguments:
|
|
|
|
|
|
Return value: `RTC_ERR_SUCCESS` or a negative error code
|
|
|
|
|
|
-After this function has been called, `pc` must not be used in a function call anymore. This function will block until all scheduled callbacks of `pc` return (except the one this function might be called in) and no other callback will be called for `pc` after it returns.
|
|
|
+If it is not already closed, the Peer Connection is implicitly closed before being deleted. After this function has been called, `pc` must not be used in a function call anymore. This function will block until all scheduled callbacks of `pc` return (except the one this function might be called in) and no other callback will be called for `pc` after it returns.
|
|
|
|
|
|
#### rtcSetXCallback
|
|
|
|
|
@@ -463,6 +477,22 @@ Return value: `RTC_ERR_SUCCESS` or a negative error code
|
|
|
|
|
|
WebSocket: Like with the JavaScript API, the state will first change to closing, then closed only after the connection has been actually closed.
|
|
|
|
|
|
+#### rtcDelete
|
|
|
+
|
|
|
+```
|
|
|
+int rtcDelete(int id)
|
|
|
+```
|
|
|
+
|
|
|
+Deletes the channel.
|
|
|
+
|
|
|
+Arguments:
|
|
|
+
|
|
|
+- `id`: the channel identifier
|
|
|
+
|
|
|
+Return value: `RTC_ERR_SUCCESS` or a negative error code
|
|
|
+
|
|
|
+If it is not already closed, the channel is implicitly closed before being deleted. After this function has been called, `id` must not be used in a function call anymore. This function will block until all scheduled callbacks of `id` return (except the one this function might be called in) and no other callback will be called for `id` after it returns.
|
|
|
+
|
|
|
#### rtcIsOpen
|
|
|
|
|
|
```
|
|
@@ -595,7 +625,7 @@ Arguments:
|
|
|
|
|
|
Return value: the identifier of the new Data Channel or a negative error code.
|
|
|
|
|
|
-The Data Channel must be deleted with `rtcDeleteDataChannel`.
|
|
|
+The Data Channel must be deleted with `rtcDeleteDataChannel` (or `rtcDelete`).
|
|
|
|
|
|
If `disableAutoNegotiation` was not set in `rtcConfiguration`, the library will automatically initiate the negotiation by calling `rtcSetLocalDescription` internally. Otherwise, the user must call `rtcSetLocalDescription` to initiate the negotiation after creating the first Data Channel.
|
|
|
|
|
@@ -695,7 +725,7 @@ Arguments:
|
|
|
|
|
|
Return value: the identifier of the new Track or a negative error code
|
|
|
|
|
|
-The new track must be deleted with `rtcDeleteTrack`.
|
|
|
+The new track must be deleted with `rtcDeleteTrack` (or `rtcDelete`).
|
|
|
|
|
|
The user must call `rtcSetLocalDescription` to negotiate the track.
|
|
|
|
|
@@ -799,7 +829,7 @@ Arguments:
|
|
|
|
|
|
Return value: the identifier of the new WebSocket or a negative error code
|
|
|
|
|
|
-The new WebSocket must be deleted with `rtcDeleteWebSocket`. The scheme of the URL must be either `ws` or `wss`.
|
|
|
+The new WebSocket must be deleted with `rtcDeleteWebSocket` (or `rtcDelete`). The scheme of the URL must be either `ws` or `wss`.
|
|
|
|
|
|
#### rtcDeleteWebSocket
|
|
|
|