diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /third_party/libwebrtc/p2p/base/port.h | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/p2p/base/port.h')
-rw-r--r-- | third_party/libwebrtc/p2p/base/port.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/third_party/libwebrtc/p2p/base/port.h b/third_party/libwebrtc/p2p/base/port.h index 78a4f91a93..796e1e1d5b 100644 --- a/third_party/libwebrtc/p2p/base/port.h +++ b/third_party/libwebrtc/p2p/base/port.h @@ -43,6 +43,7 @@ #include "rtc_base/memory/always_valid_pointer.h" #include "rtc_base/net_helper.h" #include "rtc_base/network.h" +#include "rtc_base/network/received_packet.h" #include "rtc_base/proxy_info.h" #include "rtc_base/rate_tracker.h" #include "rtc_base/socket_address.h" @@ -313,10 +314,7 @@ class RTC_EXPORT Port : public PortInterface, public sigslot::has_slots<> { // port implemented this method. // TODO(mallinath) - Make it pure virtual. virtual bool HandleIncomingPacket(rtc::AsyncPacketSocket* socket, - const char* data, - size_t size, - const rtc::SocketAddress& remote_addr, - int64_t packet_time_us); + const rtc::ReceivedPacket& packet); // Shall the port handle packet from this `remote_addr`. // This method is overridden by TurnPort. @@ -422,10 +420,19 @@ class RTC_EXPORT Port : public PortInterface, public sigslot::has_slots<> { // Called when a packet is received from an unknown address that is not // currently a connection. If this is an authenticated STUN binding request, // then we will signal the client. - void OnReadPacket(const char* data, - size_t size, - const rtc::SocketAddress& addr, - ProtocolType proto); + void OnReadPacket(const rtc::ReceivedPacket& packet, ProtocolType proto); + + [[deprecated( + "Use OnReadPacket(const rtc::ReceivedPacket& packet, ProtocolType " + "proto)")]] void + OnReadPacket(const char* data, + size_t size, + const rtc::SocketAddress& addr, + ProtocolType proto) { + OnReadPacket(rtc::ReceivedPacket::CreateFromLegacy( + data, size, /*packet_time_us = */ -1, addr), + proto); + } // If the given data comprises a complete and correct STUN message then the // return value is true, otherwise false. If the message username corresponds |