Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
b986e21e
Unverified
提交
b986e21e
authored
12月 04, 2023
作者:
José Luis Millán
提交者:
GitHub
12月 04, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
LibUring: Enable liburing usage for SCTP data delivery (#1249)
liburing: Enable liburing usage for SCTP data delivery
上级
bf57b8a4
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
37 行增加
和
0 行删除
+37
-0
CHANGELOG.md
CHANGELOG.md
+5
-0
DepUsrSCTP.cpp
worker/src/DepUsrSCTP.cpp
+17
-0
Router.cpp
worker/src/RTC/Router.cpp
+15
-0
没有找到文件。
CHANGELOG.md
浏览文件 @
b986e21e
# Changelog
# Changelog
### Next
*
LibUring: Enable liburing usage for SCTP data delivery (
[
PR 1249
](
https://github.com/versatica/mediasoup/pull/1249
)
).
### 3.13.7
### 3.13.7
*
Update worker dependencies (
[
PR #1201
](
https://github.com/versatica/mediasoup/pull/1201
)
):
*
Update worker dependencies (
[
PR #1201
](
https://github.com/versatica/mediasoup/pull/1201
)
):
...
...
worker/src/DepUsrSCTP.cpp
浏览文件 @
b986e21e
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
// #define MS_LOG_DEV_LEVEL 3
// #define MS_LOG_DEV_LEVEL 3
#include "DepUsrSCTP.hpp"
#include "DepUsrSCTP.hpp"
#ifdef MS_LIBURING_SUPPORTED
#include "DepLibUring.hpp"
#endif
#include "DepLibUV.hpp"
#include "DepLibUV.hpp"
#include "Logger.hpp"
#include "Logger.hpp"
#include <usrsctp.h>
#include <usrsctp.h>
...
@@ -249,7 +252,21 @@ void DepUsrSCTP::Checker::OnTimer(TimerHandle* /*timer*/)
...
@@ -249,7 +252,21 @@ void DepUsrSCTP::Checker::OnTimer(TimerHandle* /*timer*/)
auto
nowMs
=
DepLibUV
::
GetTimeMs
();
auto
nowMs
=
DepLibUV
::
GetTimeMs
();
const
int
elapsedMs
=
this
->
lastCalledAtMs
?
static_cast
<
int
>
(
nowMs
-
this
->
lastCalledAtMs
)
:
0
;
const
int
elapsedMs
=
this
->
lastCalledAtMs
?
static_cast
<
int
>
(
nowMs
-
this
->
lastCalledAtMs
)
:
0
;
#ifdef MS_LIBURING_SUPPORTED
// Activate liburing usage.
// 'usrsctp_handle_timers()' will synchronously call the send/recv
// callbacks for the pending data. If there are multiple messages to be
// sent over the network then we will send those messages within a single
// system call.
DepLibUring
::
SetActive
();
#endif
usrsctp_handle_timers
(
elapsedMs
);
usrsctp_handle_timers
(
elapsedMs
);
#ifdef MS_LIBURING_SUPPORTED
// Submit all prepared submission entries.
DepLibUring
::
Submit
();
#endif
this
->
lastCalledAtMs
=
nowMs
;
this
->
lastCalledAtMs
=
nowMs
;
}
}
worker/src/RTC/Router.cpp
浏览文件 @
b986e21e
...
@@ -921,10 +921,25 @@ namespace RTC
...
@@ -921,10 +921,25 @@ namespace RTC
auto
&
dataConsumers
=
this
->
mapDataProducerDataConsumers
.
at
(
dataProducer
);
auto
&
dataConsumers
=
this
->
mapDataProducerDataConsumers
.
at
(
dataProducer
);
if
(
!
dataConsumers
.
empty
())
{
#ifdef MS_LIBURING_SUPPORTED
// Activate liburing usage.
// The effective sending could be synchronous, thus we would send those
// messages within a single system call.
DepLibUring
::
SetActive
();
#endif
for
(
auto
*
dataConsumer
:
dataConsumers
)
for
(
auto
*
dataConsumer
:
dataConsumers
)
{
{
dataConsumer
->
SendMessage
(
msg
,
len
,
ppid
,
subchannels
,
requiredSubchannel
);
dataConsumer
->
SendMessage
(
msg
,
len
,
ppid
,
subchannels
,
requiredSubchannel
);
}
}
#ifdef MS_LIBURING_SUPPORTED
// Submit all prepared submission entries.
DepLibUring
::
Submit
();
#endif
}
}
}
inline
void
Router
::
OnTransportNewDataConsumer
(
inline
void
Router
::
OnTransportNewDataConsumer
(
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论