diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /third_party/libwebrtc/rtc_base/socket.h | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/rtc_base/socket.h')
-rw-r--r-- | third_party/libwebrtc/rtc_base/socket.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/third_party/libwebrtc/rtc_base/socket.h b/third_party/libwebrtc/rtc_base/socket.h index fac75aca94..98e468e754 100644 --- a/third_party/libwebrtc/rtc_base/socket.h +++ b/third_party/libwebrtc/rtc_base/socket.h @@ -14,6 +14,7 @@ #include <errno.h> #include "absl/types/optional.h" +#include "rtc_base/checks.h" #if defined(WEBRTC_POSIX) #include <arpa/inet.h> @@ -86,11 +87,11 @@ inline bool IsBlockingError(int e) { class RTC_EXPORT Socket { public: struct ReceiveBuffer { - ReceiveBuffer(rtc::Buffer& payload) : payload(payload) {} + ReceiveBuffer(Buffer& payload) : payload(payload) {} absl::optional<webrtc::Timestamp> arrival_time; SocketAddress source_address; - rtc::Buffer& payload; + Buffer& payload; }; virtual ~Socket() {} @@ -111,10 +112,14 @@ class RTC_EXPORT Socket { virtual int SendTo(const void* pv, size_t cb, const SocketAddress& addr) = 0; // `timestamp` is in units of microseconds. virtual int Recv(void* pv, size_t cb, int64_t* timestamp) = 0; + // TODO(webrtc:15368): Deprecate and remove. virtual int RecvFrom(void* pv, size_t cb, SocketAddress* paddr, - int64_t* timestamp) = 0; + int64_t* timestamp) { + // Not implemented. Use RecvFrom(ReceiveBuffer& buffer). + RTC_CHECK_NOTREACHED(); + } // Intended to replace RecvFrom(void* ...). // Default implementation calls RecvFrom(void* ...) with 64Kbyte buffer. // Returns number of bytes received or a negative value on error. |