From 3e64a42b1492e38bf033041c0eb1212542728cbd Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Sun, 21 Apr 2019 04:57:53 +0200 Subject: Update to new DataChannel API. New WebRTCLibDataChannel class act as PacketPeer. Old WebRTCPeer (now WebRTCPeerConnection) now allows you to set configuration (STUN/TURN) and creating multiple data channels. Fixed many bugs and implemented most of the missing API. --- src/GodotDataChannelObserver.cpp | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 src/GodotDataChannelObserver.cpp (limited to 'src/GodotDataChannelObserver.cpp') diff --git a/src/GodotDataChannelObserver.cpp b/src/GodotDataChannelObserver.cpp deleted file mode 100644 index 7a6cf96..0000000 --- a/src/GodotDataChannelObserver.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "WebRTCLibPeer.hpp" - -using namespace godot_webrtc; - -WebRTCLibPeer::GodotDCO::GodotDCO(WebRTCLibPeer *parent) { - this->parent = parent; -} - -void WebRTCLibPeer::GodotDCO::OnMessage(const webrtc::DataBuffer &buffer) { - const uint8_t *data = buffer.data.data(); - uint8_t *memory_controlled_buffer = new uint8_t[buffer.data.size()]; - - std::copy(data, data + buffer.data.size(), memory_controlled_buffer); - parent->queue_packet(memory_controlled_buffer, buffer.data.size()); -}; - -void WebRTCLibPeer::GodotDCO::OnStateChange(){}; - -void WebRTCLibPeer::GodotDCO::OnBufferedAmountChange(uint64_t previous_amount){}; -- cgit v1.2.3