From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- third_party/libwebrtc/net/dcsctp/public/dcsctp_socket.h | 11 +++++++++++ third_party/libwebrtc/net/dcsctp/public/mock_dcsctp_socket.h | 8 ++++++++ 2 files changed, 19 insertions(+) (limited to 'third_party/libwebrtc/net/dcsctp/public') diff --git a/third_party/libwebrtc/net/dcsctp/public/dcsctp_socket.h b/third_party/libwebrtc/net/dcsctp/public/dcsctp_socket.h index d0a81eaeb2..9989ae8d43 100644 --- a/third_party/libwebrtc/net/dcsctp/public/dcsctp_socket.h +++ b/third_party/libwebrtc/net/dcsctp/public/dcsctp_socket.h @@ -13,6 +13,7 @@ #include #include #include +#include #include "absl/strings/string_view.h" #include "absl/types/optional.h" @@ -577,6 +578,16 @@ class DcSctpSocketInterface { virtual SendStatus Send(DcSctpMessage message, const SendOptions& send_options) = 0; + // Sends the messages `messages` using the provided send options. + // Sending a message is an asynchronous operation, and the `OnError` callback + // may be invoked to indicate any errors in sending the message. + // + // This has identical semantics to Send, except that it may coalesce many + // messages into a single SCTP packet if they would fit. + virtual std::vector SendMany( + rtc::ArrayView messages, + const SendOptions& send_options) = 0; + // Resetting streams is an asynchronous operation and the results will // be notified using `DcSctpSocketCallbacks::OnStreamsResetDone()` on success // and `DcSctpSocketCallbacks::OnStreamsResetFailed()` on failure. Note that diff --git a/third_party/libwebrtc/net/dcsctp/public/mock_dcsctp_socket.h b/third_party/libwebrtc/net/dcsctp/public/mock_dcsctp_socket.h index 0fd572bd94..c71c3ae16f 100644 --- a/third_party/libwebrtc/net/dcsctp/public/mock_dcsctp_socket.h +++ b/third_party/libwebrtc/net/dcsctp/public/mock_dcsctp_socket.h @@ -10,6 +10,8 @@ #ifndef NET_DCSCTP_PUBLIC_MOCK_DCSCTP_SOCKET_H_ #define NET_DCSCTP_PUBLIC_MOCK_DCSCTP_SOCKET_H_ +#include + #include "net/dcsctp/public/dcsctp_socket.h" #include "test/gmock.h" @@ -56,6 +58,12 @@ class MockDcSctpSocket : public DcSctpSocketInterface { (DcSctpMessage message, const SendOptions& send_options), (override)); + MOCK_METHOD(std::vector, + SendMany, + (rtc::ArrayView messages, + const SendOptions& send_options), + (override)); + MOCK_METHOD(ResetStreamsStatus, ResetStreams, (rtc::ArrayView outgoing_streams), -- cgit v1.2.3