Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
89d793c7
提交
89d793c7
authored
12月 21, 2015
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve syntax
上级
7d62fea1
隐藏空白字符变更
内嵌
并排
正在显示
40 个修改的文件
包含
122 行增加
和
106 行删除
+122
-106
index.js
lib/Channel/index.js
+2
-1
Request.h
worker/include/Channel/Request.h
+2
-2
UnixStreamSocket.h
worker/include/Channel/UnixStreamSocket.h
+2
-2
Loop.h
worker/include/Loop.h
+5
-1
DTLSHandler.h
worker/include/RTC/DTLSHandler.h
+5
-5
FingerprintHash.h
worker/include/RTC/FingerprintHash.h
+1
-1
ICEServer.h
worker/include/RTC/ICEServer.h
+3
-3
Peer.h
worker/include/RTC/Peer.h
+4
-4
RTCPPacket.h
worker/include/RTC/RTCPPacket.h
+2
-2
RTPPacket.h
worker/include/RTC/RTPPacket.h
+3
-3
Room.h
worker/include/RTC/Room.h
+3
-3
SRTPProfile.h
worker/include/RTC/SRTPProfile.h
+1
-1
SRTPSession.h
worker/include/RTC/SRTPSession.h
+2
-2
STUNMessage.h
worker/include/RTC/STUNMessage.h
+3
-3
Stream.h
worker/include/RTC/Stream.h
+1
-1
TCPConnection.h
worker/include/RTC/TCPConnection.h
+3
-3
TCPServer.h
worker/include/RTC/TCPServer.h
+2
-2
Transport.h
worker/include/RTC/Transport.h
+4
-4
TransportSource.h
worker/include/RTC/TransportSource.h
+3
-3
UDPSocket.h
worker/include/RTC/UDPSocket.h
+2
-2
SignalsHandler.h
worker/include/handles/SignalsHandler.h
+2
-2
TCPConnection.h
worker/include/handles/TCPConnection.h
+2
-2
TCPServer.h
worker/include/handles/TCPServer.h
+3
-3
Timer.h
worker/include/handles/Timer.h
+2
-2
UDPSocket.h
worker/include/handles/UDPSocket.h
+3
-3
UnixStreamSocket.h
worker/include/handles/UnixStreamSocket.h
+3
-3
UnixStreamSocket.cpp
worker/src/Channel/UnixStreamSocket.cpp
+23
-19
Loop.cpp
worker/src/Loop.cpp
+9
-1
ICEServer.cpp
worker/src/RTC/ICEServer.cpp
+1
-1
RTCPPacket.cpp
worker/src/RTC/RTCPPacket.cpp
+1
-1
RTPPacket.cpp
worker/src/RTC/RTPPacket.cpp
+1
-1
Room.cpp
worker/src/RTC/Room.cpp
+10
-10
SRTPSession.cpp
worker/src/RTC/SRTPSession.cpp
+1
-1
STUNMessage.cpp
worker/src/RTC/STUNMessage.cpp
+1
-1
Stream.cpp
worker/src/RTC/Stream.cpp
+1
-2
TCPConnection.cpp
worker/src/RTC/TCPConnection.cpp
+2
-2
TCPServer.cpp
worker/src/RTC/TCPServer.cpp
+1
-1
Transport.cpp
worker/src/RTC/Transport.cpp
+1
-1
TransportSource.cpp
worker/src/RTC/TransportSource.cpp
+1
-1
UDPSocket.cpp
worker/src/RTC/UDPSocket.cpp
+1
-1
没有找到文件。
lib/Channel/index.js
浏览文件 @
89d793c7
...
...
@@ -6,8 +6,9 @@ const netstring = require('netstring');
const
logger
=
require
(
'../logger'
)(
'Channel'
);
const
Request
=
require
(
'./Request'
);
// netstring length for a 65536 bytes payload
const
MESSAGE_MAX_SIZE
=
65543
;
// Max time waiting for a response from the worker subprocess
const
MESSAGE_MAX_SIZE
=
65536
;
const
REQUEST_TIMEOUT
=
5000
;
class
Channel
extends
EventEmitter
...
...
worker/include/Channel/Request.h
浏览文件 @
89d793c7
...
...
@@ -26,12 +26,12 @@ namespace Channel
void
Reject
(
unsigned
int
status
,
const
char
*
reason
=
nullptr
);
public
:
// Passed by argument
:
// Passed by argument
.
Channel
::
UnixStreamSocket
*
channel
=
nullptr
;
unsigned
int
id
;
std
::
string
method
;
Json
::
Value
data
;
// Others
:
// Others
.
bool
replied
=
false
;
};
}
...
...
worker/include/Channel/UnixStreamSocket.h
浏览文件 @
89d793c7
...
...
@@ -36,9 +36,9 @@ namespace Channel
virtual
void
userOnUnixStreamSocketClosed
(
bool
is_closed_by_peer
)
override
;
private
:
// Passed by argument
:
// Passed by argument
.
Listener
*
listener
=
nullptr
;
// Others
:
// Others
.
size_t
msgStart
=
0
;
// Where the latest message starts.
};
}
...
...
worker/include/Loop.h
浏览文件 @
89d793c7
...
...
@@ -5,6 +5,8 @@
#include "handles/SignalsHandler.h"
#include "Channel/UnixStreamSocket.h"
#include "Channel/Request.h"
#include "RTC/Room.h"
#include <unordered_map>
class
Loop
:
public
SignalsHandler
::
Listener
,
...
...
@@ -14,7 +16,7 @@ public:
Loop
();
~
Loop
();
// TODO: IMHO this can be private.
private
:
void
Close
();
/* Methods inherited from SignalsHandler::Listener. */
...
...
@@ -33,6 +35,8 @@ private:
Channel
::
UnixStreamSocket
*
channel
=
nullptr
;
// Others.
bool
closed
=
false
;
typedef
std
::
unordered_map
<
unsigned
int
,
RTC
::
Room
*>
Rooms
;
Rooms
rooms
;
};
#endif
worker/include/RTC/DTLSHandler.h
浏览文件 @
89d793c7
...
...
@@ -94,14 +94,14 @@ namespace RTC
virtual
void
onTimer
(
Timer
*
timer
)
override
;
private
:
// Passed by argument
:
// Passed by argument
.
Listener
*
listener
=
nullptr
;
// Allocated by this
:
// Allocated by this
.
SSL
*
ssl
=
nullptr
;
BIO
*
sslBioFromNetwork
=
nullptr
;
// The BIO from which ssl reads.
BIO
*
sslBioFromNetwork
=
nullptr
;
// The BIO from which ssl reads.
BIO
*
sslBioToNetwork
=
nullptr
;
// The BIO in which ssl writes.
Timer
*
timer
=
nullptr
;
// Others
:
// Others
.
RTC
::
DTLSRole
role
;
RTC
::
FingerprintHash
remoteFingerprintHash
=
RTC
::
FingerprintHash
::
NONE
;
std
::
string
remoteFingerprint
;
...
...
@@ -140,6 +140,6 @@ namespace RTC
{
return
this
->
isRunning
;
}
}
// namespace RTC
}
#endif
worker/include/RTC/FingerprintHash.h
浏览文件 @
89d793c7
...
...
@@ -12,6 +12,6 @@ namespace RTC
SHA384
,
SHA512
};
}
// namespace RTC
}
#endif
worker/include/RTC/ICEServer.h
浏览文件 @
89d793c7
...
...
@@ -35,10 +35,10 @@ namespace RTC
void
Close
();
private
:
// Passed by argument
:
// Passed by argument
.
Listener
*
listener
=
nullptr
;
void
*
userData
=
nullptr
;
// Others
:
// Others
.
std
::
string
localUsername
;
std
::
string
localPassword
;
};
...
...
@@ -68,6 +68,6 @@ namespace RTC
{
return
this
->
userData
;
}
}
// namespace RTC
}
#endif
worker/include/RTC/Peer.h
浏览文件 @
89d793c7
...
...
@@ -8,7 +8,7 @@
namespace
RTC
{
class
Peer
:
RTC
::
Transport
::
Listener
class
Peer
:
public
RTC
::
Transport
::
Listener
{
public
:
class
Listener
...
...
@@ -34,10 +34,10 @@ namespace RTC
virtual
void
onRTCPPacket
(
RTC
::
Transport
*
transport
,
RTC
::
RTCPPacket
*
packet
)
override
;
private
:
// Passed by argument
:
// Passed by argument
.
Listener
*
listener
=
nullptr
;
void
*
userData
=
nullptr
;
// Others
:
// Others
.
RTC
::
Transport
*
transport
=
nullptr
;
};
...
...
@@ -54,6 +54,6 @@ namespace RTC
{
return
this
->
userData
;
}
}
// namespace RTC
}
#endif
worker/include/RTC/RTCPPacket.h
浏览文件 @
89d793c7
...
...
@@ -36,7 +36,7 @@ namespace RTC
size_t
GetLength
();
private
:
// Passed by argument
:
// Passed by argument
.
CommonHeader
*
header
=
nullptr
;
MS_BYTE
*
raw
=
nullptr
;
size_t
length
=
0
;
...
...
@@ -75,6 +75,6 @@ namespace RTC
{
return
this
->
length
;
}
}
// namespace RTC
}
#endif
worker/include/RTC/RTPPacket.h
浏览文件 @
89d793c7
...
...
@@ -66,7 +66,7 @@ namespace RTC
void
Dump
();
private
:
// Passed by argument
:
// Passed by argument
.
Header
*
header
=
nullptr
;
MS_BYTE
*
csrcList
=
nullptr
;
ExtensionHeader
*
extensionHeader
=
nullptr
;
...
...
@@ -75,7 +75,7 @@ namespace RTC
MS_BYTE
payloadPadding
=
0
;
MS_BYTE
*
raw
=
nullptr
;
// Allocated when Serialize().
size_t
length
=
0
;
// Others
:
// Others
.
bool
isSerialized
=
false
;
};
...
...
@@ -195,6 +195,6 @@ namespace RTC
{
return
this
->
payloadLength
;
}
}
// namespace RTC
}
#endif
worker/include/RTC/Room.h
浏览文件 @
89d793c7
...
...
@@ -8,7 +8,7 @@
namespace
RTC
{
class
Room
:
RTC
::
Peer
::
Listener
class
Room
:
public
RTC
::
Peer
::
Listener
{
public
:
Room
();
...
...
@@ -22,10 +22,10 @@ namespace RTC
virtual
void
onRTCPPacket
(
RTC
::
Peer
*
peer
,
RTC
::
RTCPPacket
*
packet
)
override
;
private
:
// Others
:
// Others
.
typedef
std
::
vector
<
RTC
::
Peer
*>
Peers
;
Peers
peers
;
};
}
// namespace RTC
}
#endif
worker/include/RTC/SRTPProfile.h
浏览文件 @
89d793c7
...
...
@@ -9,6 +9,6 @@ namespace RTC
AES_CM_128_HMAC_SHA1_80
=
1
,
AES_CM_128_HMAC_SHA1_32
};
}
// namespace RTC
}
#endif
worker/include/RTC/SRTPSession.h
浏览文件 @
89d793c7
...
...
@@ -38,7 +38,7 @@ namespace RTC
void
Close
();
private
:
// Allocated by this
:
// Allocated by this
.
srtp_t
session
=
nullptr
;
// Others:
err_status_t
lastError
=
(
err_status_t
)
0
;
...
...
@@ -56,6 +56,6 @@ namespace RTC
return
error_string
;
}
}
// namespace RTC
}
#endif
worker/include/RTC/STUNMessage.h
浏览文件 @
89d793c7
...
...
@@ -93,13 +93,13 @@ namespace RTC
void
Dump
();
private
:
// Passed by argument
:
// Passed by argument
.
Class
klass
;
// 2 bytes.
Method
method
;
// 2 bytes.
const
MS_BYTE
*
transactionId
=
nullptr
;
// 12 bytes.
MS_BYTE
*
raw
=
nullptr
;
// Allocated when Serialize().
size_t
length
=
0
;
// The full message size (including header).
// Others
:
// Others
.
bool
isSerialized
=
false
;
// STUN attributes.
std
::
string
username
;
// Less than 513 bytes.
...
...
@@ -269,6 +269,6 @@ namespace RTC
{
return
this
->
hasFingerprint
;
}
}
// namespace RTC
}
#endif
worker/include/RTC/Stream.h
浏览文件 @
89d793c7
...
...
@@ -20,6 +20,6 @@ namespace RTC
MS_4BYTES
ssrc
=
0
;
std
::
unordered_set
<
MS_BYTE
>
payloads
;
};
}
// namespace RTC
}
#endif
worker/include/RTC/TCPConnection.h
浏览文件 @
89d793c7
...
...
@@ -29,11 +29,11 @@ namespace RTC
virtual
void
userOnTCPConnectionRead
()
override
;
private
:
// Passed by argument
:
// Passed by argument
.
Reader
*
reader
=
nullptr
;
// Others
:
// Others
.
size_t
frameStart
=
0
;
// Where the latest frame starts.
};
}
// namespace RTC
}
#endif
worker/include/RTC/TCPServer.h
浏览文件 @
89d793c7
...
...
@@ -49,7 +49,7 @@ namespace RTC
virtual
void
userOnTCPServerClosed
()
override
;
private
:
// Passed by argument
:
// Passed by argument
.
Listener
*
listener
=
nullptr
;
RTC
::
TCPConnection
::
Reader
*
reader
=
nullptr
;
};
...
...
@@ -62,6 +62,6 @@ namespace RTC
this
->
listener
=
listener
;
this
->
reader
=
reader
;
}
}
// namespace RTC
}
#endif
worker/include/RTC/Transport.h
浏览文件 @
89d793c7
...
...
@@ -141,17 +141,17 @@ namespace RTC
virtual
void
onDTLSApplicationData
(
RTC
::
DTLSHandler
*
dtlsHandler
,
const
MS_BYTE
*
data
,
size_t
len
)
override
;
private
:
// Allocated by this
:
// Allocated by this
.
RTC
::
ICEServer
*
iceServer
=
nullptr
;
RTC
::
DTLSHandler
*
dtlsHandler
=
nullptr
;
RTC
::
SRTPSession
*
srtpRecvSession
=
nullptr
;
RTC
::
SRTPSession
*
srtpSendSession
=
nullptr
;
// Passed by argument
:
// Passed by argument
.
Listener
*
listener
=
nullptr
;
std
::
vector
<
RTC
::
UDPSocket
*>
udpSockets
;
std
::
vector
<
RTC
::
TCPServer
*>
tcpServers
;
void
*
userData
=
nullptr
;
// Others
:
// Others
.
int
flags
=
0
;
std
::
list
<
RTC
::
TransportSource
>
sources
;
RTC
::
TransportSource
*
sendingSource
=
nullptr
;
...
...
@@ -326,6 +326,6 @@ namespace RTC
return
false
;
}
}
// namespace RTC
}
#endif
worker/include/RTC/TransportSource.h
浏览文件 @
89d793c7
...
...
@@ -32,12 +32,12 @@ namespace RTC
void
Dump
();
private
:
// Passed by argument
:
// Passed by argument
.
RTC
::
UDPSocket
*
udpSocket
=
nullptr
;
struct
sockaddr
*
udpRemoteAddr
=
nullptr
;
sockaddr_storage
udpRemoteAddrStorage
;
RTC
::
TCPConnection
*
tcpConnection
=
nullptr
;
// Others
:
// Others
.
Type
type
;
};
...
...
@@ -118,6 +118,6 @@ namespace RTC
if
(
this
->
type
==
Type
::
TCP
)
this
->
tcpConnection
->
Close
();
}
}
// namespace RTC
}
#endif
worker/include/RTC/UDPSocket.h
浏览文件 @
89d793c7
...
...
@@ -49,7 +49,7 @@ namespace RTC
virtual
void
userOnUDPSocketClosed
()
override
;
private
:
// Passed by argument
:
// Passed by argument
.
Listener
*
listener
=
nullptr
;
};
...
...
@@ -60,6 +60,6 @@ namespace RTC
{
this
->
listener
=
listener
;
}
}
// namespace RTC
}
#endif
worker/include/handles/SignalsHandler.h
浏览文件 @
89d793c7
...
...
@@ -26,10 +26,10 @@ public:
void
onUvSignal
(
int
signum
);
private
:
// Allocated by this
:
// Allocated by this
.
typedef
std
::
vector
<
uv_signal_t
*>
UvHandles
;
UvHandles
uvHandles
;
// Passed by argument
:
// Passed by argument
.
Listener
*
listener
=
nullptr
;
};
...
...
worker/include/handles/TCPConnection.h
浏览文件 @
89d793c7
...
...
@@ -70,9 +70,9 @@ private:
bool
hasError
=
false
;
protected
:
// Allocated by this
:
// Allocated by this
.
MS_BYTE
*
buffer
=
nullptr
;
// Passed by argument
:
// Passed by argument
.
size_t
bufferSize
=
0
;
// Others.
size_t
bufferDataLen
=
0
;
...
...
worker/include/handles/TCPServer.h
浏览文件 @
89d793c7
...
...
@@ -47,11 +47,11 @@ public:
virtual
void
onTCPConnectionClosed
(
TCPConnection
*
connection
,
bool
is_closed_by_peer
);
private
:
// Allocated by this (may be passed by argument)
:
// Allocated by this (may be passed by argument)
.
uv_tcp_t
*
uvHandle
=
nullptr
;
// Passed by argument
:
// Passed by argument
.
void
*
userData
=
nullptr
;
// Others
:
// Others
.
typedef
std
::
unordered_set
<
TCPConnection
*>
TCPConnections
;
TCPConnections
connections
;
bool
isClosing
=
false
;
...
...
worker/include/handles/Timer.h
浏览文件 @
89d793c7
...
...
@@ -25,9 +25,9 @@ public:
void
onUvTimer
();
private
:
// Allocated by this
:
// Allocated by this
.
uv_timer_t
*
uvHandle
=
nullptr
;
// Passed by argument
:
// Passed by argument
.
Listener
*
listener
=
nullptr
;
};
...
...
worker/include/handles/UDPSocket.h
浏览文件 @
89d793c7
...
...
@@ -55,11 +55,11 @@ protected:
virtual
void
userOnUDPSocketClosed
()
=
0
;
private
:
// Allocated by this (may be passed by argument)
:
// Allocated by this (may be passed by argument)
.
uv_udp_t
*
uvHandle
=
nullptr
;
// Passed by argument
:
// Passed by argument
.
void
*
userData
=
nullptr
;
// Others
:
// Others
.
bool
isClosing
=
false
;
protected
:
...
...
worker/include/handles/UnixStreamSocket.h
浏览文件 @
89d793c7
...
...
@@ -51,11 +51,11 @@ private:
bool
hasError
=
false
;
protected
:
// Allocated by this
:
// Allocated by this
.
MS_BYTE
*
buffer
=
nullptr
;
// Passed by argument
:
// Passed by argument
.
size_t
bufferSize
=
0
;
// Others
:
// Others
.
size_t
bufferDataLen
=
0
;
};
...
...
worker/src/Channel/UnixStreamSocket.cpp
浏览文件 @
89d793c7
...
...
@@ -8,7 +8,8 @@
#include <cmath> // std::ceil()
#include <cstdio> // sprintf()
#define MESSAGE_MAX_SIZE 65536
// netstring length for a 65536 bytes payload
#define MESSAGE_MAX_SIZE 65543
namespace
Channel
{
...
...
@@ -23,6 +24,8 @@ namespace Channel
listener
(
listener
)
{
MS_TRACE
();
MS_ERROR
(
"---- MAX NS: %lu"
,
netstring_buffer_size
(
MESSAGE_MAX_SIZE
));
}
UnixStreamSocket
::~
UnixStreamSocket
()
...
...
@@ -115,23 +118,23 @@ namespace Channel
return
;
case
NETSTRING_ERROR_TOO_LONG
:
MS_
THROW_
ERROR
(
"NETSTRING_ERROR_TOO_LONG"
);
MS_ERROR
(
"NETSTRING_ERROR_TOO_LONG"
);
break
;
case
NETSTRING_ERROR_NO_COLON
:
MS_
THROW_
ERROR
(
"NETSTRING_ERROR_NO_COLON"
);
MS_ERROR
(
"NETSTRING_ERROR_NO_COLON"
);
break
;
case
NETSTRING_ERROR_NO_COMMA
:
MS_
THROW_
ERROR
(
"NETSTRING_ERROR_NO_COMMA"
);
MS_ERROR
(
"NETSTRING_ERROR_NO_COMMA"
);
break
;
case
NETSTRING_ERROR_LEADING_ZERO
:
MS_
THROW_
ERROR
(
"NETSTRING_ERROR_LEADING_ZERO"
);
MS_ERROR
(
"NETSTRING_ERROR_LEADING_ZERO"
);
break
;
case
NETSTRING_ERROR_NO_LENGTH
:
MS_
THROW_
ERROR
(
"NETSTRING_ERROR_NO_LENGTH"
);
MS_ERROR
(
"NETSTRING_ERROR_NO_LENGTH"
);
break
;
}
...
...
@@ -149,25 +152,26 @@ namespace Channel
Json
::
Value
json
;
Json
::
Reader
reader
;
if
(
!
reader
.
parse
((
const
char
*
)
json_start
,
(
const
char
*
)
json_start
+
json_len
,
json
))
if
(
reader
.
parse
((
const
char
*
)
json_start
,
(
const
char
*
)
json_start
+
json_len
,
json
))
{
MS_THROW_ERROR
(
"invalid JSON"
);
}
Channel
::
Request
*
request
=
Request
::
Factory
(
this
,
json
);
Channel
::
Request
*
request
=
Request
::
Factory
(
this
,
json
);
if
(
request
)
{
// Notify the listener.
this
->
listener
->
onChannelRequest
(
this
,
request
);
if
(
request
)
{
// Notify the listener.
this
->
listener
->
onChannelRequest
(
this
,
request
);
// Delete the Request.
delete
request
;
// Delete the Request.
delete
request
;
}
else
{
MS_ERROR
(
"discarding wrong Channel request"
);
}
}
else
{
// TODO: throw?
MS_ERROR
(
"discarding wrong Channel request"
);
MS_ERROR
(
"invalid JSON"
);
}
// If there is no more space available in the buffer and that is because
...
...
worker/src/Loop.cpp
浏览文件 @
89d793c7
...
...
@@ -60,8 +60,16 @@ void Loop::Close()
// Close the SignalsHandler.
this
->
signalsHandler
->
Close
();
// Close the Channel socket
// Close the Channel socket
.
this
->
channel
->
Close
();
// Close all the Rooms.
for
(
auto
&
kv
:
this
->
rooms
)
{
RTC
::
Room
*
room
=
kv
.
second
;
room
->
Close
();
}
}
void
Loop
::
onSignal
(
SignalsHandler
*
signalsHandler
,
int
signum
)
...
...
worker/src/RTC/ICEServer.cpp
浏览文件 @
89d793c7
...
...
@@ -185,4 +185,4 @@ namespace RTC
delete
this
;
}
}
// namespace RTC
}
worker/src/RTC/RTCPPacket.cpp
浏览文件 @
89d793c7
...
...
@@ -36,4 +36,4 @@ namespace RTC
{
MS_TRACE
();
}
}
// namespace RTC
}
worker/src/RTC/RTPPacket.cpp
浏览文件 @
89d793c7
...
...
@@ -233,4 +233,4 @@ namespace RTC
MS_DEBUG
(
"- Payload size: %zu bytes"
,
GetPayloadLength
());
MS_DEBUG
(
"[/RTPPacket]"
);
}
}
// namespace RTC
}
worker/src/RTC/Room.cpp
浏览文件 @
89d793c7
...
...
@@ -20,17 +20,16 @@ namespace RTC
MS_TRACE
();
// TMP
// for (int i = 1; i <= NUM_PEERS; i++)
// {
// RTC::Peer* peer = new RTC::Peer(this);
for
(
int
i
=
1
;
i
<=
NUM_PEERS
;
i
++
)
{
RTC
::
Peer
*
peer
=
new
RTC
::
Peer
(
this
);
// TODO: this is not being freed
int
*
data
=
new
int
(
i
);
peer
->
SetUserData
((
void
*
)
data
);
// // TODO: this is not being freed
// int* data = new int(i);
// peer->SetUserData((void*)data);
this
->
peers
.
push_back
(
peer
);
}
//
this->peers.push_back(peer);
//
}
}
Room
::~
Room
()
...
...
@@ -42,6 +41,7 @@ namespace RTC
{
MS_TRACE
();
// Close all the Peers.
for
(
auto
peer
:
this
->
peers
)
peer
->
Close
();
...
...
@@ -114,4 +114,4 @@ namespace RTC
// dst_peer->SendRTCPPacket(packet);
// }
}
}
// namespace RTC
}
worker/src/RTC/SRTPSession.cpp
浏览文件 @
89d793c7
...
...
@@ -213,4 +213,4 @@ namespace RTC
delete
this
;
}
}
// namespace RTC
}
worker/src/RTC/STUNMessage.cpp
浏览文件 @
89d793c7
...
...
@@ -629,4 +629,4 @@ namespace RTC
MS_DEBUG
(
"- has Fingerprint"
);
MS_DEBUG
(
"[/STUNMessage]"
);
}
}
// namespace RTC
}
worker/src/RTC/Stream.cpp
浏览文件 @
89d793c7
...
...
@@ -21,7 +21,6 @@ namespace RTC
{
MS_TRACE
();
// TODO: sure I want this?
delete
this
;
}
}
// namespace RTC
}
worker/src/RTC/TCPConnection.cpp
浏览文件 @
89d793c7
...
...
@@ -163,7 +163,7 @@ namespace RTC
// Exit the parsing loop.
break
;
}
}
// while()
}
}
void
TCPConnection
::
Send
(
const
MS_BYTE
*
data
,
size_t
len
)
...
...
@@ -178,4 +178,4 @@ namespace RTC
Write
(
frame_len
,
2
,
data
,
len
);
}
}
// namespace RTC
}
worker/src/RTC/TCPServer.cpp
浏览文件 @
89d793c7
...
...
@@ -365,4 +365,4 @@ namespace RTC
else
if
(
this
->
localAddr
.
ss_family
==
AF_INET6
)
RTC
::
TCPServer
::
availableIPv6Ports
[
this
->
localPort
]
=
true
;
}
}
// namespace RTC
}
worker/src/RTC/Transport.cpp
浏览文件 @
89d793c7
...
...
@@ -658,4 +658,4 @@ namespace RTC
// TMP
dtlsHandler
->
SendApplicationData
(
data
,
len
);
}
}
// namespace RTC
}
worker/src/RTC/TransportSource.cpp
浏览文件 @
89d793c7
...
...
@@ -39,4 +39,4 @@ namespace RTC
}
}
}
}
// namespace RTC
}
worker/src/RTC/UDPSocket.cpp
浏览文件 @
89d793c7
...
...
@@ -386,4 +386,4 @@ namespace RTC
else
if
(
this
->
localAddr
.
ss_family
==
AF_INET6
)
RTC
::
UDPSocket
::
availableIPv6Ports
[
this
->
localPort
]
=
true
;
}
}
// namespace RTC
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论