mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-16 15:20:42 +01:00

The current send queue implements SCTP_SS_FCFS as defined in https://datatracker.ietf.org/doc/html/rfc8260#section-3.1, but that has always been known to be a temporary solution. The end goal is to implement a Weighted Fair Queueing Scheduler (SCTP_SS_WFQ), but that's likely to take some time. Meanwhile, a round robin scheduler (SCTP_SS_RR) will be used to avoid some issues with the current scheduler, such as a single data channel completely blocking all others if it sends a lot of messages. In this first commit, the code has simply been renamed and is still implementing first-come-first-served. That will be fixed in follow-up CLS. Bug: webrtc:12793 Change-Id: Idc03b1594551bfe1ddbe1710872814b9fdf60cc9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219684 Commit-Queue: Victor Boivie <boivie@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34090}
234 lines
5.9 KiB
Text
234 lines
5.9 KiB
Text
# Copyright (c) 2021 The WebRTC project authors. All Rights Reserved.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license
|
|
# that can be found in the LICENSE file in the root of the source
|
|
# tree. An additional intellectual property rights grant can be found
|
|
# in the file PATENTS. All contributing project authors may
|
|
# be found in the AUTHORS file in the root of the source tree.
|
|
|
|
import("../../../webrtc.gni")
|
|
|
|
rtc_source_set("context") {
|
|
sources = [ "context.h" ]
|
|
deps = [
|
|
"../common:internal_types",
|
|
"../packet:sctp_packet",
|
|
"../public:socket",
|
|
"../public:types",
|
|
]
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
|
|
}
|
|
|
|
rtc_library("heartbeat_handler") {
|
|
deps = [
|
|
":context",
|
|
"../../../api:array_view",
|
|
"../../../rtc_base",
|
|
"../../../rtc_base:checks",
|
|
"../../../rtc_base:rtc_base_approved",
|
|
"../packet:bounded_io",
|
|
"../packet:chunk",
|
|
"../packet:parameter",
|
|
"../packet:sctp_packet",
|
|
"../public:socket",
|
|
"../public:types",
|
|
"../timer",
|
|
]
|
|
sources = [
|
|
"heartbeat_handler.cc",
|
|
"heartbeat_handler.h",
|
|
]
|
|
absl_deps = [
|
|
"//third_party/abseil-cpp/absl/strings",
|
|
"//third_party/abseil-cpp/absl/types:optional",
|
|
]
|
|
}
|
|
|
|
rtc_library("stream_reset_handler") {
|
|
deps = [
|
|
":context",
|
|
"../../../api:array_view",
|
|
"../../../rtc_base",
|
|
"../../../rtc_base:checks",
|
|
"../../../rtc_base:rtc_base_approved",
|
|
"../common:internal_types",
|
|
"../common:str_join",
|
|
"../packet:chunk",
|
|
"../packet:parameter",
|
|
"../packet:sctp_packet",
|
|
"../packet:tlv_trait",
|
|
"../public:socket",
|
|
"../public:types",
|
|
"../rx:data_tracker",
|
|
"../rx:reassembly_queue",
|
|
"../timer",
|
|
"../tx:retransmission_queue",
|
|
]
|
|
sources = [
|
|
"stream_reset_handler.cc",
|
|
"stream_reset_handler.h",
|
|
]
|
|
absl_deps = [
|
|
"//third_party/abseil-cpp/absl/strings",
|
|
"//third_party/abseil-cpp/absl/types:optional",
|
|
]
|
|
}
|
|
|
|
rtc_library("transmission_control_block") {
|
|
deps = [
|
|
":context",
|
|
":heartbeat_handler",
|
|
":stream_reset_handler",
|
|
"../../../api:array_view",
|
|
"../../../rtc_base",
|
|
"../../../rtc_base:checks",
|
|
"../../../rtc_base:rtc_base_approved",
|
|
"../common:sequence_numbers",
|
|
"../packet:chunk",
|
|
"../packet:sctp_packet",
|
|
"../public:socket",
|
|
"../public:types",
|
|
"../rx:data_tracker",
|
|
"../rx:reassembly_queue",
|
|
"../timer",
|
|
"../tx:retransmission_error_counter",
|
|
"../tx:retransmission_queue",
|
|
"../tx:retransmission_timeout",
|
|
"../tx:send_queue",
|
|
]
|
|
sources = [
|
|
"capabilities.h",
|
|
"transmission_control_block.cc",
|
|
"transmission_control_block.h",
|
|
]
|
|
absl_deps = [
|
|
"//third_party/abseil-cpp/absl/strings",
|
|
"//third_party/abseil-cpp/absl/types:optional",
|
|
]
|
|
}
|
|
|
|
rtc_library("dcsctp_socket") {
|
|
deps = [
|
|
":context",
|
|
":heartbeat_handler",
|
|
":stream_reset_handler",
|
|
":transmission_control_block",
|
|
"../../../api:array_view",
|
|
"../../../api:refcountedbase",
|
|
"../../../api:scoped_refptr",
|
|
"../../../rtc_base",
|
|
"../../../rtc_base:checks",
|
|
"../../../rtc_base:rtc_base_approved",
|
|
"../common:internal_types",
|
|
"../packet:bounded_io",
|
|
"../packet:chunk",
|
|
"../packet:chunk_validators",
|
|
"../packet:data",
|
|
"../packet:error_cause",
|
|
"../packet:parameter",
|
|
"../packet:sctp_packet",
|
|
"../packet:tlv_trait",
|
|
"../public:socket",
|
|
"../public:types",
|
|
"../rx:data_tracker",
|
|
"../rx:reassembly_queue",
|
|
"../timer",
|
|
"../tx:retransmission_error_counter",
|
|
"../tx:retransmission_queue",
|
|
"../tx:retransmission_timeout",
|
|
"../tx:rr_send_queue",
|
|
"../tx:send_queue",
|
|
]
|
|
sources = [
|
|
"callback_deferrer.h",
|
|
"dcsctp_socket.cc",
|
|
"dcsctp_socket.h",
|
|
"state_cookie.cc",
|
|
"state_cookie.h",
|
|
]
|
|
absl_deps = [
|
|
"//third_party/abseil-cpp/absl/strings",
|
|
"//third_party/abseil-cpp/absl/types:optional",
|
|
]
|
|
}
|
|
|
|
if (rtc_include_tests) {
|
|
rtc_source_set("mock_callbacks") {
|
|
testonly = true
|
|
sources = [ "mock_dcsctp_socket_callbacks.h" ]
|
|
deps = [
|
|
"../../../api:array_view",
|
|
"../../../rtc_base:logging",
|
|
"../../../rtc_base:rtc_base_approved",
|
|
"../../../test:test_support",
|
|
"../public:socket",
|
|
"../public:types",
|
|
"../timer",
|
|
]
|
|
absl_deps = [
|
|
"//third_party/abseil-cpp/absl/strings",
|
|
"//third_party/abseil-cpp/absl/types:optional",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("mock_context") {
|
|
testonly = true
|
|
sources = [ "mock_context.h" ]
|
|
deps = [
|
|
":context",
|
|
":mock_callbacks",
|
|
"../../../test:test_support",
|
|
"../common:internal_types",
|
|
"../packet:sctp_packet",
|
|
"../public:socket",
|
|
"../public:types",
|
|
]
|
|
absl_deps = [
|
|
"//third_party/abseil-cpp/absl/strings",
|
|
"//third_party/abseil-cpp/absl/types:optional",
|
|
]
|
|
}
|
|
|
|
rtc_library("dcsctp_socket_unittests") {
|
|
testonly = true
|
|
|
|
deps = [
|
|
":dcsctp_socket",
|
|
":heartbeat_handler",
|
|
":mock_callbacks",
|
|
":mock_context",
|
|
":stream_reset_handler",
|
|
"../../../api:array_view",
|
|
"../../../rtc_base:checks",
|
|
"../../../rtc_base:gunit_helpers",
|
|
"../../../rtc_base:rtc_base_approved",
|
|
"../../../test:test_support",
|
|
"../common:internal_types",
|
|
"../packet:chunk",
|
|
"../packet:error_cause",
|
|
"../packet:parameter",
|
|
"../packet:sctp_packet",
|
|
"../packet:tlv_trait",
|
|
"../public:socket",
|
|
"../public:types",
|
|
"../rx:data_tracker",
|
|
"../rx:reassembly_queue",
|
|
"../testing:data_generator",
|
|
"../testing:testing_macros",
|
|
"../timer",
|
|
"../tx:mock_send_queue",
|
|
"../tx:retransmission_queue",
|
|
]
|
|
absl_deps = [
|
|
"//third_party/abseil-cpp/absl/memory",
|
|
"//third_party/abseil-cpp/absl/strings",
|
|
"//third_party/abseil-cpp/absl/types:optional",
|
|
]
|
|
sources = [
|
|
"dcsctp_socket_test.cc",
|
|
"heartbeat_handler_test.cc",
|
|
"state_cookie_test.cc",
|
|
"stream_reset_handler_test.cc",
|
|
]
|
|
}
|
|
}
|