mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 17:30:37 +02:00
Add extra WebRTC debug
This commit is contained in:
parent
ed36321e25
commit
fa01ead130
1 changed files with 8 additions and 1 deletions
|
@ -291,6 +291,9 @@ void WDCConnection::onDataChannelOpened(rtc::scoped_refptr<DataChannelInterface>
|
||||||
_dataChannelID = _parent->getNewDataChannelID(); // Not dataChannel->id() because it's only unique per peer connection.
|
_dataChannelID = _parent->getNewDataChannelID(); // Not dataChannel->id() because it's only unique per peer connection.
|
||||||
_dataChannel->RegisterObserver(_dataChannelObserver.get());
|
_dataChannel->RegisterObserver(_dataChannelObserver.get());
|
||||||
|
|
||||||
|
#ifdef WEBRTC_DEBUG
|
||||||
|
qCDebug(networking_webrtc) << "WDCConnection::onDataChannelOpened() : channel ID:" << _dataChannelID;
|
||||||
|
#endif
|
||||||
_parent->onDataChannelOpened(this, _dataChannelID);
|
_parent->onDataChannelOpened(this, _dataChannelID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -486,7 +489,8 @@ void WebRTCDataChannels::sendSignalingMessage(const QJsonObject& message) {
|
||||||
|
|
||||||
void WebRTCDataChannels::emitDataMessage(int dataChannelID, const QByteArray& byteArray) {
|
void WebRTCDataChannels::emitDataMessage(int dataChannelID, const QByteArray& byteArray) {
|
||||||
#ifdef WEBRTC_DEBUG
|
#ifdef WEBRTC_DEBUG
|
||||||
qCDebug(networking_webrtc) << "WebRTCDataChannels::emitDataMessage() :" << dataChannelID << byteArray;
|
qCDebug(networking_webrtc) << "WebRTCDataChannels::emitDataMessage() :" << dataChannelID << byteArray.toHex()
|
||||||
|
<< byteArray.length();
|
||||||
#endif
|
#endif
|
||||||
emit dataMessage(dataChannelID, byteArray);
|
emit dataMessage(dataChannelID, byteArray);
|
||||||
}
|
}
|
||||||
|
@ -557,6 +561,9 @@ void WebRTCDataChannels::closePeerConnectionNow(WDCConnection* connection) {
|
||||||
connection->closePeerConnection();
|
connection->closePeerConnection();
|
||||||
|
|
||||||
// Delete the WDCConnection.
|
// Delete the WDCConnection.
|
||||||
|
#ifdef WEBRTC_DEBUG
|
||||||
|
qCDebug(networking_webrtc) << "Dispose of connection for channel ID:" << connection->getDataChannelID();
|
||||||
|
#endif
|
||||||
_connectionsByWebSocket.remove(connection->getWebSocketID());
|
_connectionsByWebSocket.remove(connection->getWebSocketID());
|
||||||
_connectionsByDataChannel.remove(connection->getDataChannelID());
|
_connectionsByDataChannel.remove(connection->getDataChannelID());
|
||||||
delete connection;
|
delete connection;
|
||||||
|
|
Loading…
Reference in a new issue