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/port.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/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 |