Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
ae62d435
提交
ae62d435
authored
12月 30, 2015
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ICE => Ice
上级
e1997532
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
21 行增加
和
21 行删除
+21
-21
IceServer.h
worker/include/RTC/IceServer.h
+6
-6
IceTransport.h
worker/include/RTC/IceTransport.h
+6
-6
IceServer.cpp
worker/src/RTC/IceServer.cpp
+5
-5
IceTransport.cpp
worker/src/RTC/IceTransport.cpp
+4
-4
没有找到文件。
worker/include/RTC/I
CE
Server.h
→
worker/include/RTC/I
ce
Server.h
浏览文件 @
ae62d435
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
namespace
RTC
namespace
RTC
{
{
class
I
CE
Server
class
I
ce
Server
{
{
public
:
public
:
class
Listener
class
Listener
...
@@ -20,12 +20,12 @@ namespace RTC
...
@@ -20,12 +20,12 @@ namespace RTC
* These callbacks are guaranteed to be called before ProcessSTUNMessage()
* These callbacks are guaranteed to be called before ProcessSTUNMessage()
* returns, so the given pointers are still usable.
* returns, so the given pointers are still usable.
*/
*/
virtual
void
onOutgoingSTUNMessage
(
I
CE
Server
*
iceServer
,
RTC
::
STUNMessage
*
msg
,
RTC
::
TransportSource
*
source
)
=
0
;
virtual
void
onOutgoingSTUNMessage
(
I
ce
Server
*
iceServer
,
RTC
::
STUNMessage
*
msg
,
RTC
::
TransportSource
*
source
)
=
0
;
virtual
void
onICEValidPair
(
I
CE
Server
*
iceServer
,
RTC
::
TransportSource
*
source
,
bool
has_use_candidate
)
=
0
;
virtual
void
onICEValidPair
(
I
ce
Server
*
iceServer
,
RTC
::
TransportSource
*
source
,
bool
has_use_candidate
)
=
0
;
};
};
public
:
public
:
I
CE
Server
(
Listener
*
listener
,
std
::
string
&
usernameFragment
,
std
::
string
password
);
I
ce
Server
(
Listener
*
listener
,
std
::
string
&
usernameFragment
,
std
::
string
password
);
void
Close
();
void
Close
();
void
ProcessSTUNMessage
(
RTC
::
STUNMessage
*
msg
,
RTC
::
TransportSource
*
source
);
void
ProcessSTUNMessage
(
RTC
::
STUNMessage
*
msg
,
RTC
::
TransportSource
*
source
);
...
@@ -43,13 +43,13 @@ namespace RTC
...
@@ -43,13 +43,13 @@ namespace RTC
/* Inline methods. */
/* Inline methods. */
inline
inline
std
::
string
&
I
CE
Server
::
GetUsernameFragment
()
std
::
string
&
I
ce
Server
::
GetUsernameFragment
()
{
{
return
this
->
usernameFragment
;
return
this
->
usernameFragment
;
}
}
inline
inline
std
::
string
&
I
CE
Server
::
GetPassword
()
std
::
string
&
I
ce
Server
::
GetPassword
()
{
{
return
this
->
password
;
return
this
->
password
;
}
}
...
...
worker/include/RTC/I
CE
Transport.h
→
worker/include/RTC/I
ce
Transport.h
浏览文件 @
ae62d435
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include "common.h"
#include "common.h"
#include "RTC/IceCandidate.h"
#include "RTC/IceCandidate.h"
#include "RTC/I
CE
Server.h"
#include "RTC/I
ce
Server.h"
#include "RTC/STUNMessage.h"
#include "RTC/STUNMessage.h"
#include "RTC/TransportSource.h"
#include "RTC/TransportSource.h"
#include "RTC/UDPSocket.h"
#include "RTC/UDPSocket.h"
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
namespace
RTC
namespace
RTC
{
{
class
IceTransport
:
class
IceTransport
:
public
RTC
::
I
CE
Server
::
Listener
,
public
RTC
::
I
ce
Server
::
Listener
,
public
RTC
::
UDPSocket
::
Listener
,
public
RTC
::
UDPSocket
::
Listener
,
public
RTC
::
TCPServer
::
Listener
,
public
RTC
::
TCPServer
::
Listener
,
public
RTC
::
TCPConnection
::
Reader
public
RTC
::
TCPConnection
::
Reader
...
@@ -51,10 +51,10 @@ namespace RTC
...
@@ -51,10 +51,10 @@ namespace RTC
std
::
vector
<
IceCandidate
>&
GetIceLocalCandidates
();
std
::
vector
<
IceCandidate
>&
GetIceLocalCandidates
();
// IceTransport* CreateAssociatedGatherer(); // TODO: let's see.
// IceTransport* CreateAssociatedGatherer(); // TODO: let's see.
/* Pure virtual methods inherited from RTC::I
CE
Server::Listener. */
/* Pure virtual methods inherited from RTC::I
ce
Server::Listener. */
public
:
public
:
virtual
void
onOutgoingSTUNMessage
(
RTC
::
I
CE
Server
*
iceServer
,
RTC
::
STUNMessage
*
msg
,
RTC
::
TransportSource
*
source
)
override
;
virtual
void
onOutgoingSTUNMessage
(
RTC
::
I
ce
Server
*
iceServer
,
RTC
::
STUNMessage
*
msg
,
RTC
::
TransportSource
*
source
)
override
;
virtual
void
onICEValidPair
(
RTC
::
I
CE
Server
*
iceServer
,
RTC
::
TransportSource
*
source
,
bool
has_use_candidate
)
override
;
virtual
void
onICEValidPair
(
RTC
::
I
ce
Server
*
iceServer
,
RTC
::
TransportSource
*
source
,
bool
has_use_candidate
)
override
;
/* Private methods to unify UDP and TCP behavior. */
/* Private methods to unify UDP and TCP behavior. */
private
:
private
:
...
@@ -85,7 +85,7 @@ namespace RTC
...
@@ -85,7 +85,7 @@ namespace RTC
// Passed by argument.
// Passed by argument.
Listener
*
listener
=
nullptr
;
Listener
*
listener
=
nullptr
;
// Allocated by this.
// Allocated by this.
RTC
::
I
CE
Server
*
iceServer
=
nullptr
;
RTC
::
I
ce
Server
*
iceServer
=
nullptr
;
std
::
vector
<
RTC
::
UDPSocket
*>
udpSockets
;
std
::
vector
<
RTC
::
UDPSocket
*>
udpSockets
;
std
::
vector
<
RTC
::
TCPServer
*>
tcpServers
;
std
::
vector
<
RTC
::
TCPServer
*>
tcpServers
;
// Others.
// Others.
...
...
worker/src/RTC/I
CE
Server.cpp
→
worker/src/RTC/I
ce
Server.cpp
浏览文件 @
ae62d435
#define MS_CLASS "RTC::I
CE
Server"
#define MS_CLASS "RTC::I
ce
Server"
#include "RTC/I
CE
Server.h"
#include "RTC/I
ce
Server.h"
#include "Logger.h"
#include "Logger.h"
namespace
RTC
namespace
RTC
{
{
/* Instance methods. */
/* Instance methods. */
I
CEServer
::
ICE
Server
(
Listener
*
listener
,
std
::
string
&
usernameFragment
,
std
::
string
password
)
:
I
ceServer
::
Ice
Server
(
Listener
*
listener
,
std
::
string
&
usernameFragment
,
std
::
string
password
)
:
listener
(
listener
),
listener
(
listener
),
usernameFragment
(
usernameFragment
),
usernameFragment
(
usernameFragment
),
password
(
password
)
password
(
password
)
...
@@ -17,14 +17,14 @@ namespace RTC
...
@@ -17,14 +17,14 @@ namespace RTC
MS_DEBUG
(
"[usernameFragment:%s, password:%s]"
,
this
->
usernameFragment
.
c_str
(),
this
->
password
.
c_str
());
MS_DEBUG
(
"[usernameFragment:%s, password:%s]"
,
this
->
usernameFragment
.
c_str
(),
this
->
password
.
c_str
());
}
}
void
I
CE
Server
::
Close
()
void
I
ce
Server
::
Close
()
{
{
MS_TRACE
();
MS_TRACE
();
delete
this
;
delete
this
;
}
}
void
I
CE
Server
::
ProcessSTUNMessage
(
RTC
::
STUNMessage
*
msg
,
RTC
::
TransportSource
*
source
)
void
I
ce
Server
::
ProcessSTUNMessage
(
RTC
::
STUNMessage
*
msg
,
RTC
::
TransportSource
*
source
)
{
{
MS_TRACE
();
MS_TRACE
();
...
...
worker/src/RTC/I
CE
Transport.cpp
→
worker/src/RTC/I
ce
Transport.cpp
浏览文件 @
ae62d435
...
@@ -42,14 +42,14 @@ namespace RTC
...
@@ -42,14 +42,14 @@ namespace RTC
MS_DEBUG
(
"[udp:%s, tcp:%s]"
,
MS_DEBUG
(
"[udp:%s, tcp:%s]"
,
option_udp
?
"true"
:
"false"
,
option_tcp
?
"true"
:
"false"
);
option_udp
?
"true"
:
"false"
,
option_tcp
?
"true"
:
"false"
);
// Create an I
CE
Server.
// Create an I
ce
Server.
char
_username_fragment
[
16
];
char
_username_fragment
[
16
];
char
_password
[
16
];
char
_password
[
16
];
std
::
string
usernameFragment
=
std
::
string
(
Utils
::
Crypto
::
GetRandomHexString
(
_username_fragment
,
16
),
16
);
std
::
string
usernameFragment
=
std
::
string
(
Utils
::
Crypto
::
GetRandomHexString
(
_username_fragment
,
16
),
16
);
std
::
string
password
=
std
::
string
(
Utils
::
Crypto
::
GetRandomHexString
(
_password
,
32
),
32
);
std
::
string
password
=
std
::
string
(
Utils
::
Crypto
::
GetRandomHexString
(
_password
,
32
),
32
);
this
->
iceServer
=
new
RTC
::
I
CE
Server
(
this
,
usernameFragment
,
password
);
this
->
iceServer
=
new
RTC
::
I
ce
Server
(
this
,
usernameFragment
,
password
);
// Fill IceParameters.
// Fill IceParameters.
this
->
iceLocalParameters
.
usernameFragment
=
this
->
iceServer
->
GetUsernameFragment
();
this
->
iceLocalParameters
.
usernameFragment
=
this
->
iceServer
->
GetUsernameFragment
();
...
@@ -184,14 +184,14 @@ namespace RTC
...
@@ -184,14 +184,14 @@ namespace RTC
return
data
;
return
data
;
}
}
void
IceTransport
::
onOutgoingSTUNMessage
(
RTC
::
I
CE
Server
*
iceServer
,
RTC
::
STUNMessage
*
msg
,
RTC
::
TransportSource
*
source
)
void
IceTransport
::
onOutgoingSTUNMessage
(
RTC
::
I
ce
Server
*
iceServer
,
RTC
::
STUNMessage
*
msg
,
RTC
::
TransportSource
*
source
)
{
{
MS_TRACE
();
MS_TRACE
();
// TODO
// TODO
}
}
void
IceTransport
::
onICEValidPair
(
RTC
::
I
CE
Server
*
iceServer
,
RTC
::
TransportSource
*
source
,
bool
has_use_candidate
)
void
IceTransport
::
onICEValidPair
(
RTC
::
I
ce
Server
*
iceServer
,
RTC
::
TransportSource
*
source
,
bool
has_use_candidate
)
{
{
MS_TRACE
();
MS_TRACE
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论