A WebRTC data channel connection.
More...
#include <WebRTCDataChannels.h>
A WebRTC data channel connection.
Opens and manages a WebRTC data channel connection.
◆ WDCConnection()
WDCConnection::WDCConnection |
( |
WebRTCDataChannels * |
parent, |
|
|
const QString & |
dataChannelID |
|
) |
| |
Constructs a new WDCConnection and opens a WebRTC data connection.
- Parameters
-
◆ addIceCandidate()
void WDCConnection::addIceCandidate |
( |
QJsonObject & |
data | ) |
|
Adds an ICE candidate received from the remote client via the signaling channel.
- Parameters
-
◆ getBufferedAmount()
qint64 WDCConnection::getBufferedAmount |
( |
| ) |
const |
Gets the number of bytes waiting to be sent on the WebRTC data channel.
- Returns
- The number of bytes waiting to be sent on the WebRTC data channel.
◆ getDataChannelID()
QString WDCConnection::getDataChannelID |
( |
| ) |
const |
|
inline |
Gets the data channel ID.
- Returns
- The data channel ID.
◆ onDataChannelMessageReceived()
void WDCConnection::onDataChannelMessageReceived |
( |
const webrtc::DataBuffer & |
buffer | ) |
|
Handles a message being received on the WebRTC data channel.
- Parameters
-
buffer | The message received. |
◆ onDataChannelOpened()
void WDCConnection::onDataChannelOpened |
( |
rtc::scoped_refptr< webrtc::DataChannelInterface > |
dataChannel | ) |
|
Handles the WebRTC data channel being opened.
- Parameters
-
dataChannel | The WebRTC data channel. |
◆ onPeerConnectionStateChanged()
void WDCConnection::onPeerConnectionStateChanged |
( |
webrtc::PeerConnectionInterface::PeerConnectionState |
state | ) |
|
Monitors the peer connection state.
- Parameters
-
state | The new peer connection state. |
◆ sendAnswer()
void WDCConnection::sendAnswer |
( |
webrtc::SessionDescriptionInterface * |
description | ) |
|
Sends an answer to the remote client via the signaling channel.
- Parameters
-
◆ sendDataMessage()
bool WDCConnection::sendDataMessage |
( |
const webrtc::DataBuffer & |
buffer | ) |
|
Sends a message on the WebRTC data channel.
- Parameters
-
buffer | The message to send. |
- Returns
true
if the message was sent, otherwise false
.
◆ sendIceCandidate()
void WDCConnection::sendIceCandidate |
( |
const webrtc::IceCandidateInterface * |
candidate | ) |
|
Sends an ICE candidate to the remote client via the signaling channel.
- Parameters
-
candidate | The ICE candidate. |
◆ setLocalDescription()
void WDCConnection::setLocalDescription |
( |
webrtc::SessionDescriptionInterface * |
description | ) |
|
Sets the local session description on the WebRTC data channel being connected.
- Parameters
-
description | The local session description. |
◆ setRemoteDescription()
void WDCConnection::setRemoteDescription |
( |
QJsonObject & |
description | ) |
|
Sets the remote session description received from the remote client via the signaling channel.
- Parameters
-
description | The remote session description. |
The documentation for this class was generated from the following files: