dcsctp: Add public API for setting priorities
This is the first part of supporting stream priorities, and adds the API and very basic support for setting and retrieving the stream priority. This commit doesn't in any way change the actual packet sending - the specified priority values are stored, but not acted on. This is all that is client visible, so clients can start using the API as written, and they would never notice that things are missing. Bug: webrtc:5696 Change-Id: I24fce8cbb6f3cba187df99d1d3f45e73621c93c6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261943 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37034}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
09a2848351
commit
17a02a31d7
@ -189,6 +189,7 @@ DcSctpSocket::DcSctpSocket(absl::string_view log_prefix,
|
||||
send_queue_(
|
||||
log_prefix_,
|
||||
options_.max_send_buffer_size,
|
||||
options_.default_stream_priority,
|
||||
[this](StreamID stream_id) {
|
||||
callbacks_.OnBufferedAmountLow(stream_id);
|
||||
},
|
||||
@ -420,6 +421,14 @@ void DcSctpSocket::InternalClose(ErrorKind error, absl::string_view message) {
|
||||
RTC_DCHECK(IsConsistent());
|
||||
}
|
||||
|
||||
void DcSctpSocket::SetStreamPriority(StreamID stream_id,
|
||||
StreamPriority priority) {
|
||||
send_queue_.SetStreamPriority(stream_id, priority);
|
||||
}
|
||||
StreamPriority DcSctpSocket::GetStreamPriority(StreamID stream_id) const {
|
||||
return send_queue_.GetStreamPriority(stream_id);
|
||||
}
|
||||
|
||||
SendStatus DcSctpSocket::Send(DcSctpMessage message,
|
||||
const SendOptions& send_options) {
|
||||
RTC_DCHECK_RUN_ON(&thread_checker_);
|
||||
|
||||
Reference in New Issue
Block a user