summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/p2p/base/stun_server.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libwebrtc/p2p/base/stun_server.h')
-rw-r--r--third_party/libwebrtc/p2p/base/stun_server.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/third_party/libwebrtc/p2p/base/stun_server.h b/third_party/libwebrtc/p2p/base/stun_server.h
index 505773b052..f6a776c5f7 100644
--- a/third_party/libwebrtc/p2p/base/stun_server.h
+++ b/third_party/libwebrtc/p2p/base/stun_server.h
@@ -12,7 +12,6 @@
#define P2P_BASE_STUN_SERVER_H_
#include <stddef.h>
-#include <stdint.h>
#include <memory>
@@ -21,26 +20,22 @@
#include "rtc_base/async_packet_socket.h"
#include "rtc_base/async_udp_socket.h"
#include "rtc_base/socket_address.h"
-#include "rtc_base/third_party/sigslot/sigslot.h"
namespace cricket {
const int STUN_SERVER_PORT = 3478;
-class StunServer : public sigslot::has_slots<> {
+class StunServer {
public:
// Creates a STUN server, which will listen on the given socket.
explicit StunServer(rtc::AsyncUDPSocket* socket);
// Removes the STUN server from the socket and deletes the socket.
- ~StunServer() override;
+ virtual ~StunServer();
protected:
- // Slot for Socket.PacketRead:
+ // Callback for packets from socket.
void OnPacket(rtc::AsyncPacketSocket* socket,
- const char* buf,
- size_t size,
- const rtc::SocketAddress& remote_addr,
- const int64_t& packet_time_us);
+ const rtc::ReceivedPacket& packet);
// Handlers for the different types of STUN/TURN requests:
virtual void OnBindingRequest(StunMessage* msg,
@@ -64,6 +59,7 @@ class StunServer : public sigslot::has_slots<> {
StunMessage* response) const;
private:
+ webrtc::SequenceChecker sequence_checker_;
std::unique_ptr<rtc::AsyncUDPSocket> socket_;
};