blob: 970f53b4bd48e5a6146b33c212bfd50cde2a2c49 [file] [log] [blame]
Mirko Bonadei79eb4dd2018-07-19 08:39:301/*
2 * Copyright 2018 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Steve Anton10542f22019-01-11 17:11:0011#include "api/data_channel_interface.h"
Mirko Bonadei79eb4dd2018-07-19 08:39:3012
Tommia50a81a2023-04-11 15:32:3413#include "rtc_base/checks.h"
14
Mirko Bonadei79eb4dd2018-07-19 08:39:3015namespace webrtc {
16
17bool DataChannelInterface::ordered() const {
18 return false;
19}
20
21uint16_t DataChannelInterface::maxRetransmitTime() const {
22 return 0;
23}
24
25uint16_t DataChannelInterface::maxRetransmits() const {
26 return 0;
27}
28
Harald Alvestrandf3736ed2019-04-08 11:09:3029absl::optional<int> DataChannelInterface::maxRetransmitsOpt() const {
30 return absl::nullopt;
31}
32
33absl::optional<int> DataChannelInterface::maxPacketLifeTime() const {
34 return absl::nullopt;
35}
36
Mirko Bonadei79eb4dd2018-07-19 08:39:3037std::string DataChannelInterface::protocol() const {
38 return std::string();
39}
40
41bool DataChannelInterface::negotiated() const {
42 return false;
43}
44
Florent Castellia563a2a2021-10-18 09:46:2145uint64_t DataChannelInterface::MaxSendQueueSize() {
46 return 16 * 1024 * 1024; // 16 MiB
47}
48
Tommia50a81a2023-04-11 15:32:3449// TODO(tommi): Remove method once downstream implementations have been removed.
50bool DataChannelInterface::Send(const DataBuffer& buffer) {
51 RTC_DCHECK_NOTREACHED();
52 return false;
53}
54
55// TODO(tommi): Remove implementation once method is pure virtual.
56void DataChannelInterface::SendAsync(
57 DataBuffer buffer,
58 absl::AnyInvocable<void(RTCError) &&> on_complete) {
59 RTC_DCHECK_NOTREACHED();
60}
61
Mirko Bonadei79eb4dd2018-07-19 08:39:3062} // namespace webrtc