diff options
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. |