diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/libwebrtc/p2p/base/stun_server.h | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/p2p/base/stun_server.h')
-rw-r--r-- | third_party/libwebrtc/p2p/base/stun_server.h | 14 |
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_; }; |