Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
22ba582c
提交
22ba582c
authored
1月 09, 2016
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Transport: add "icestatechange" and "iceselectedtuplechange" events.
上级
c306d7cc
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
212 行增加
和
54 行删除
+212
-54
Transport.js
lib/Transport.js
+49
-9
test_transport.js
test/test_transport.js
+10
-1
server.js
tester/server/server.js
+11
-1
TransportTuple.h
worker/include/RTC/TransportTuple.h
+24
-19
TCPConnection.h
worker/include/handles/TCPConnection.h
+9
-1
IceServer.cpp
worker/src/RTC/IceServer.cpp
+8
-14
Transport.cpp
worker/src/RTC/Transport.cpp
+53
-4
TransportTuple.cpp
worker/src/RTC/TransportTuple.cpp
+45
-3
TCPConnection.cpp
worker/src/handles/TCPConnection.cpp
+2
-1
TCPServer.cpp
worker/src/handles/TCPServer.cpp
+1
-1
没有找到文件。
lib/Transport.js
浏览文件 @
22ba582c
...
...
@@ -34,15 +34,25 @@ class Transport extends EventEmitter
// - .type
// - .protocol
// - .tcpType
// - .dtlsLocalParameters
// - .fingerprints
// - .sha-1
// - .sha-224
// - .sha-256
// - .sha-384
// - .sha-512
// - .role
// - .dtlsState
// - .iceSelectedTuple
// - .local
// - .ip
// - .port
// - .protocol
// - .remote
// - .ip
// - .port
// - .protocol
// - .iceState
// - .dtlsLocalParameters
// - .role
// - .fingerprints
// - .sha-1
// - .sha-224
// - .sha-256
// - .sha-384
// - .sha-512
// - .dtlsState
this
.
_data
=
data
;
// Channel instance
...
...
@@ -56,6 +66,22 @@ class Transport extends EventEmitter
{
switch
(
event
)
{
case
'iceselectedtuplechange'
:
{
this
.
_data
.
iceSelectedTuple
=
data
.
iceSelectedTuple
;
// Emit it to the app
this
.
emit
(
event
,
data
);
break
;
}
case
'icestatechange'
:
{
this
.
_data
.
iceState
=
data
.
iceState
;
// Emit it to the app
this
.
emit
(
event
,
data
);
break
;
}
case
'dtlsstatechange'
:
{
this
.
_data
.
dtlsState
=
data
.
dtlsState
;
...
...
@@ -90,6 +116,16 @@ class Transport extends EventEmitter
return
this
.
_data
.
iceLocalCandidates
;
}
get
iceSelectedTuple
()
{
return
this
.
_data
.
iceSelectedTuple
;
}
get
iceState
()
{
return
this
.
_data
.
iceState
;
}
get
dtlsLocalParameters
()
{
return
this
.
_data
.
dtlsLocalParameters
;
...
...
@@ -120,6 +156,10 @@ class Transport extends EventEmitter
// We won't receive events anymore, so be nice and manually update
// some fields and emit events before firing 'close'
this
.
_data
.
iceState
=
'closed'
;
this
.
emit
(
'icestatechange'
,
{
iceState
:
'closed'
});
if
(
this
.
_data
.
dtlsState
!==
'closed'
)
{
this
.
_data
.
dtlsState
=
'closed'
;
...
...
test/test_transport.js
浏览文件 @
22ba582c
...
...
@@ -18,6 +18,8 @@ tap.test('transport.createAssociatedTransport() must succeed', { timeout: 1000 }
{
t
.
pass
(
'peer.createTransport() succeeded'
);
t
.
equal
(
transport
.
iceComponent
,
'RTP'
,
'transport must have "RTP" `iceComponent`'
);
t
.
notOk
(
transport
.
iceSelectedTuple
,
'transport must not have `iceSelectedTuple`'
);
t
.
equal
(
transport
.
iceState
,
'new'
,
'transport must have "new" `iceState`'
);
t
.
equal
(
transport
.
dtlsState
,
'new'
,
'transport must have "new" `dtlsState`'
);
transport
.
iceLocalCandidates
.
forEach
((
candidate
)
=>
...
...
@@ -69,7 +71,7 @@ tap.test('transport.close() must succeed', { timeout: 1000 }, (t) =>
{
let
server
=
mediasoup
.
Server
();
t
.
plan
(
7
);
t
.
plan
(
10
);
t
.
tearDown
(()
=>
server
.
close
());
let
room
=
server
.
Room
();
...
...
@@ -80,6 +82,13 @@ tap.test('transport.close() must succeed', { timeout: 1000 }, (t) =>
{
t
.
pass
(
'peer.createTransport() succeeded'
);
transport
.
on
(
'icestatechange'
,
(
data
)
=>
{
t
.
pass
(
'event "icestatechange" fired'
);
t
.
equal
(
data
.
iceState
,
'closed'
,
'event `data.iceState` must be "closed"'
);
t
.
equal
(
transport
.
iceState
,
'closed'
,
'`transport.iceState` must be "closed"'
);
});
transport
.
on
(
'dtlsstatechange'
,
(
data
)
=>
{
t
.
pass
(
'event "dtlsstatechange" fired'
);
...
...
tester/server/server.js
浏览文件 @
22ba582c
...
...
@@ -169,7 +169,7 @@ app.put('/test-transport', function(req)
// Create transports promises
for
(
let
i
=
0
;
i
<
numTransports
;
i
++
)
{
let
promise
=
mediaPeer
.
createTransport
({
udp
:
true
,
tcp
:
tru
e
});
let
promise
=
mediaPeer
.
createTransport
({
udp
:
true
,
tcp
:
fals
e
});
// Set transport event listeners
promise
.
then
((
transport
)
=>
...
...
@@ -179,6 +179,16 @@ app.put('/test-transport', function(req)
debug
(
'transport "close" event'
);
});
transport
.
on
(
'iceselectedtuplechange'
,
(
data
)
=>
{
debug
(
'transport "iceselectedtuplechange" event [data.iceSelectedTuple:%o, transport.iceSelectedTuple:%o]'
,
data
.
iceSelectedTuple
,
transport
.
iceSelectedTuple
);
});
transport
.
on
(
'icestatechange'
,
(
data
)
=>
{
debug
(
'transport "icestatechange" event [data.iceState:%s, transport.iceState:%s]'
,
data
.
iceState
,
transport
.
iceState
);
});
transport
.
on
(
'dtlsstatechange'
,
(
data
)
=>
{
debug
(
'transport "dtlsstatechange" event [data.dtlsState:%s, transport.dtlsState:%s]'
,
data
.
dtlsState
,
transport
.
dtlsState
);
...
...
worker/include/RTC/TransportTuple.h
浏览文件 @
22ba582c
...
...
@@ -5,13 +5,14 @@
#include "RTC/UDPSocket.h"
#include "RTC/TCPConnection.h"
#include "Utils.h"
#include <json/json.h>
namespace
RTC
{
class
TransportTuple
{
public
:
enum
class
Type
enum
class
Protocol
{
UDP
=
1
,
TCP
...
...
@@ -22,12 +23,13 @@ namespace RTC
TransportTuple
(
RTC
::
TCPConnection
*
tcpConnection
);
void
Close
();
Json
::
Value
toJson
();
void
Dump
();
void
StoreUdpRemoteAddress
();
bool
IsUDP
();
bool
IsTCP
();
bool
Compare
(
TransportTuple
*
tuple
);
void
Send
(
const
MS_BYTE
*
data
,
size_t
len
);
Protocol
GetProtocol
();
const
struct
sockaddr
*
GetLocalAddress
();
const
struct
sockaddr
*
GetRemoteAddress
();
private
:
...
...
@@ -37,7 +39,7 @@ namespace RTC
sockaddr_storage
udpRemoteAddrStorage
;
RTC
::
TCPConnection
*
tcpConnection
=
nullptr
;
// Others.
Type
type
;
Protocol
protocol
;
};
/* Inline methods. */
...
...
@@ -45,7 +47,7 @@ namespace RTC
inline
void
TransportTuple
::
Close
()
{
if
(
this
->
type
==
Type
::
TCP
)
if
(
this
->
protocol
==
Protocol
::
TCP
)
this
->
tcpConnection
->
Close
();
}
...
...
@@ -53,13 +55,13 @@ namespace RTC
TransportTuple
::
TransportTuple
(
RTC
::
UDPSocket
*
udpSocket
,
const
struct
sockaddr
*
udpRemoteAddr
)
:
udpSocket
(
udpSocket
),
udpRemoteAddr
((
struct
sockaddr
*
)
udpRemoteAddr
),
type
(
Type
::
UDP
)
protocol
(
Protocol
::
UDP
)
{}
inline
TransportTuple
::
TransportTuple
(
RTC
::
TCPConnection
*
tcpConnection
)
:
tcpConnection
(
tcpConnection
),
type
(
Type
::
TCP
)
protocol
(
Protocol
::
TCP
)
{}
inline
...
...
@@ -72,25 +74,19 @@ namespace RTC
}
inline
bool
TransportTuple
::
IsUDP
()
TransportTuple
::
Protocol
TransportTuple
::
GetProtocol
()
{
return
(
this
->
type
==
Type
::
UDP
);
}
inline
bool
TransportTuple
::
IsTCP
()
{
return
(
this
->
type
==
Type
::
TCP
);
return
this
->
protocol
;
}
inline
bool
TransportTuple
::
Compare
(
TransportTuple
*
tuple
)
{
if
(
this
->
type
==
Type
::
UDP
&&
tuple
->
IsUDP
()
)
if
(
this
->
protocol
==
Protocol
::
UDP
&&
tuple
->
GetProtocol
()
==
Protocol
::
UDP
)
{
return
(
this
->
udpSocket
==
tuple
->
udpSocket
&&
Utils
::
IP
::
CompareAddresses
(
this
->
udpRemoteAddr
,
tuple
->
GetRemoteAddress
()));
}
else
if
(
this
->
type
==
Type
::
TCP
&&
tuple
->
IsTCP
()
)
else
if
(
this
->
protocol
==
Protocol
::
TCP
&&
tuple
->
GetProtocol
()
==
Protocol
::
TCP
)
{
return
(
this
->
tcpConnection
==
tuple
->
tcpConnection
);
}
...
...
@@ -103,16 +99,25 @@ namespace RTC
inline
void
TransportTuple
::
Send
(
const
MS_BYTE
*
data
,
size_t
len
)
{
if
(
this
->
type
==
Type
::
UDP
)
if
(
this
->
protocol
==
Protocol
::
UDP
)
this
->
udpSocket
->
Send
(
data
,
len
,
this
->
udpRemoteAddr
);
else
this
->
tcpConnection
->
Send
(
data
,
len
);
}
inline
const
struct
sockaddr
*
TransportTuple
::
GetLocalAddress
()
{
if
(
this
->
protocol
==
Protocol
::
UDP
)
return
this
->
udpSocket
->
GetLocalAddress
();
else
return
this
->
tcpConnection
->
GetLocalAddress
();
}
inline
const
struct
sockaddr
*
TransportTuple
::
GetRemoteAddress
()
{
if
(
this
->
type
==
Type
::
UDP
)
if
(
this
->
protocol
==
Protocol
::
UDP
)
return
(
const
struct
sockaddr
*
)
this
->
udpRemoteAddr
;
else
return
this
->
tcpConnection
->
GetPeerAddress
();
...
...
worker/include/handles/TCPConnection.h
浏览文件 @
22ba582c
...
...
@@ -27,12 +27,13 @@ public:
TCPConnection
(
size_t
bufferSize
);
virtual
~
TCPConnection
();
void
Setup
(
Listener
*
listener
,
const
std
::
string
&
localIP
,
MS_PORT
localPort
);
void
Setup
(
Listener
*
listener
,
struct
sockaddr_storage
*
localAddr
,
const
std
::
string
&
localIP
,
MS_PORT
localPort
);
uv_tcp_t
*
GetUvHandle
();
void
Start
();
void
Write
(
const
MS_BYTE
*
data
,
size_t
len
);
void
Write
(
const
MS_BYTE
*
data1
,
size_t
len1
,
const
MS_BYTE
*
data2
,
size_t
len2
);
void
Write
(
const
std
::
string
&
data
);
const
struct
sockaddr
*
GetLocalAddress
();
const
std
::
string
&
GetLocalIP
();
MS_PORT
GetLocalPort
();
const
struct
sockaddr
*
GetPeerAddress
();
...
...
@@ -62,6 +63,7 @@ private:
// Passed by argument.
Listener
*
listener
=
nullptr
;
// Others.
struct
sockaddr_storage
*
localAddr
=
nullptr
;
bool
isClosing
=
false
;
bool
isClosedByPeer
=
false
;
bool
hasError
=
false
;
...
...
@@ -94,6 +96,12 @@ void TCPConnection::Write(const std::string &data)
Write
((
const
MS_BYTE
*
)
data
.
c_str
(),
data
.
size
());
}
inline
const
struct
sockaddr
*
TCPConnection
::
GetLocalAddress
()
{
return
(
const
struct
sockaddr
*
)
this
->
localAddr
;
}
inline
const
std
::
string
&
TCPConnection
::
GetLocalIP
()
{
...
...
worker/src/RTC/IceServer.cpp
浏览文件 @
22ba582c
...
...
@@ -204,15 +204,8 @@ namespace RTC
MS_ASSERT
(
stored_tuple
,
"cannot force the selected tuple if the given tuple was not already a valid tuple"
);
// If the given tuple was already the selected tuple do nothing.
if
(
stored_tuple
==
this
->
selectedTuple
)
return
;
// Mark it as selected tuple.
SetSelectedTuple
(
stored_tuple
);
// Notify the listener.
this
->
listener
->
onICESelectedTuple
(
this
,
stored_tuple
);
}
void
IceServer
::
HandleTuple
(
RTC
::
TransportTuple
*
tuple
,
bool
has_use_candidate
)
...
...
@@ -243,7 +236,6 @@ namespace RTC
this
->
state
=
IceState
::
CONNECTED
;
// Notify the listener.
this
->
listener
->
onICESelectedTuple
(
this
,
stored_tuple
);
this
->
listener
->
onICEConnected
(
this
);
}
else
...
...
@@ -260,7 +252,6 @@ namespace RTC
this
->
state
=
IceState
::
COMPLETED
;
// Notify the listener.
this
->
listener
->
onICESelectedTuple
(
this
,
stored_tuple
);
this
->
listener
->
onICECompleted
(
this
);
}
...
...
@@ -298,7 +289,6 @@ namespace RTC
this
->
state
=
IceState
::
COMPLETED
;
// Notify the listener.
this
->
listener
->
onICESelectedTuple
(
this
,
stored_tuple
);
this
->
listener
->
onICECompleted
(
this
);
}
...
...
@@ -329,9 +319,6 @@ namespace RTC
// Mark it as selected tuple.
SetSelectedTuple
(
stored_tuple
);
// Notify the listener.
this
->
listener
->
onICESelectedTuple
(
this
,
stored_tuple
);
}
break
;
...
...
@@ -351,7 +338,7 @@ namespace RTC
// If it is UDP then we must store the remote address (until now it is
// just a pointer that will be freed soon).
if
(
stored_tuple
->
IsUDP
()
)
if
(
stored_tuple
->
GetProtocol
()
==
TransportTuple
::
Protocol
::
UDP
)
stored_tuple
->
StoreUdpRemoteAddress
();
// Return the address of the inserted tuple.
...
...
@@ -389,7 +376,14 @@ namespace RTC
{
MS_TRACE
();
// If already the selected tuple do nothing.
if
(
stored_tuple
==
this
->
selectedTuple
)
return
;
this
->
selectedTuple
=
stored_tuple
;
// Notify the listener.
this
->
listener
->
onICESelectedTuple
(
this
,
this
->
selectedTuple
);
}
// TODO
...
...
worker/src/RTC/Transport.cpp
浏览文件 @
22ba582c
...
...
@@ -249,6 +249,11 @@ namespace RTC
static
const
Json
::
StaticString
k_usernameFragment
(
"usernameFragment"
);
static
const
Json
::
StaticString
k_password
(
"password"
);
static
const
Json
::
StaticString
k_iceLocalCandidates
(
"iceLocalCandidates"
);
static
const
Json
::
StaticString
k_iceSelectedTuple
(
"iceSelectedTuple"
);
static
const
Json
::
StaticString
k_iceState
(
"iceState"
);
static
const
Json
::
StaticString
v_new
(
"new"
);
static
const
Json
::
StaticString
v_connected
(
"connected"
);
static
const
Json
::
StaticString
v_completed
(
"completed"
);
static
const
Json
::
StaticString
k_dtlsLocalParameters
(
"dtlsLocalParameters"
);
static
const
Json
::
StaticString
k_fingerprints
(
"fingerprints"
);
static
const
Json
::
StaticString
k_role
(
"role"
);
...
...
@@ -256,9 +261,7 @@ namespace RTC
static
const
Json
::
StaticString
v_client
(
"client"
);
static
const
Json
::
StaticString
v_server
(
"server"
);
static
const
Json
::
StaticString
k_dtlsState
(
"dtlsState"
);
static
const
Json
::
StaticString
v_new
(
"new"
);
static
const
Json
::
StaticString
v_connecting
(
"connecting"
);
static
const
Json
::
StaticString
v_connected
(
"connected"
);
static
const
Json
::
StaticString
v_closed
(
"closed"
);
static
const
Json
::
StaticString
v_failed
(
"failed"
);
...
...
@@ -281,6 +284,24 @@ namespace RTC
data
[
k_iceLocalCandidates
].
append
(
iceCandidate
.
toJson
());
}
// Add `iceSelectedTuple`.
if
(
this
->
selectedTuple
)
data
[
k_iceSelectedTuple
]
=
this
->
selectedTuple
->
toJson
();
// Add `iceState`.
switch
(
this
->
iceServer
->
GetState
())
{
case
RTC
:
:
IceServer
::
IceState
::
NEW
:
data
[
k_iceState
]
=
v_new
;
break
;
case
RTC
:
:
IceServer
::
IceState
::
CONNECTED
:
data
[
k_iceState
]
=
v_connected
;
break
;
case
RTC
:
:
IceServer
::
IceState
::
COMPLETED
:
data
[
k_iceState
]
=
v_completed
;
break
;
}
// Add `dtlsLocalParameters.fingerprints`.
data
[
k_dtlsLocalParameters
][
k_fingerprints
]
=
RTC
::
DTLSTransport
::
GetLocalFingerprints
();
...
...
@@ -754,11 +775,13 @@ namespace RTC
{
MS_TRACE
();
static
const
Json
::
StaticString
k_iceSelectedTuple
(
"iceSelectedTuple"
);
Json
::
Value
eventData
;
if
(
!
IsAlive
())
return
;
this
->
selectedTuple
=
tuple
;
/*
* RFC 5245 section 11.2 "Receiving Media":
*
...
...
@@ -766,22 +789,48 @@ namespace RTC
* on any candidates provided for that component.
*/
this
->
selectedTuple
=
tuple
;
// If ready, run the DTLS handler.
MayRunDTLSTransport
();
// Notify.
eventData
[
k_iceSelectedTuple
]
=
tuple
->
toJson
();
// Notify.
this
->
notifier
->
Emit
(
this
->
transportId
,
"iceselectedtuplechange"
,
eventData
);
}
void
Transport
::
onICEConnected
(
RTC
::
IceServer
*
iceServer
)
{
MS_TRACE
();
static
const
Json
::
StaticString
k_iceState
(
"iceState"
);
static
const
Json
::
StaticString
v_connected
(
"connected"
);
Json
::
Value
eventData
;
MS_DEBUG
(
"ICE connected"
);
// Notify.
eventData
[
k_iceState
]
=
v_connected
;
this
->
notifier
->
Emit
(
this
->
transportId
,
"icestatechange"
,
eventData
);
}
void
Transport
::
onICECompleted
(
RTC
::
IceServer
*
iceServer
)
{
MS_TRACE
();
static
const
Json
::
StaticString
k_iceState
(
"iceState"
);
static
const
Json
::
StaticString
v_completed
(
"completed"
);
Json
::
Value
eventData
;
MS_DEBUG
(
"ICE completed"
);
// Notify.
eventData
[
k_iceState
]
=
v_completed
;
this
->
notifier
->
Emit
(
this
->
transportId
,
"icestatechange"
,
eventData
);
}
void
Transport
::
onDTLSConnecting
(
RTC
::
DTLSTransport
*
dtlsTransport
)
...
...
worker/src/RTC/TransportTuple.cpp
浏览文件 @
22ba582c
...
...
@@ -2,12 +2,54 @@
#include "RTC/TransportTuple.h"
#include "Logger.h"
#include "Utils.h"
#include <string>
namespace
RTC
{
/* Instance methods. */
Json
::
Value
TransportTuple
::
toJson
()
{
MS_TRACE
();
static
const
Json
::
StaticString
k_local
(
"local"
);
static
const
Json
::
StaticString
k_remote
(
"remote"
);
static
const
Json
::
StaticString
k_ip
(
"ip"
);
static
const
Json
::
StaticString
k_port
(
"port"
);
static
const
Json
::
StaticString
k_protocol
(
"protocol"
);
static
const
Json
::
StaticString
v_udp
(
"udp"
);
static
const
Json
::
StaticString
v_tcp
(
"tcp"
);
Json
::
Value
data
;
Json
::
Value
localTuple
;
Json
::
Value
remoteTuple
;
int
ip_family
;
std
::
string
ip
;
MS_PORT
port
;
Utils
::
IP
::
GetAddressInfo
(
this
->
GetLocalAddress
(),
&
ip_family
,
ip
,
&
port
);
localTuple
[
k_ip
]
=
ip
;
localTuple
[
k_port
]
=
port
;
if
(
this
->
GetProtocol
()
==
RTC
::
TransportTuple
::
Protocol
::
UDP
)
localTuple
[
k_protocol
]
=
v_udp
;
else
localTuple
[
k_protocol
]
=
v_tcp
;
Utils
::
IP
::
GetAddressInfo
(
this
->
GetRemoteAddress
(),
&
ip_family
,
ip
,
&
port
);
remoteTuple
[
k_ip
]
=
ip
;
remoteTuple
[
k_port
]
=
port
;
if
(
this
->
GetProtocol
()
==
RTC
::
TransportTuple
::
Protocol
::
UDP
)
remoteTuple
[
k_protocol
]
=
v_udp
;
else
remoteTuple
[
k_protocol
]
=
v_tcp
;
data
[
k_local
]
=
localTuple
;
data
[
k_remote
]
=
remoteTuple
;
return
data
;
}
void
TransportTuple
::
Dump
()
{
MS_TRACE
();
...
...
@@ -15,9 +57,9 @@ namespace RTC
if
(
!
Logger
::
HasDebugLevel
())
return
;
switch
(
this
->
type
)
switch
(
this
->
protocol
)
{
case
Type
:
:
UDP
:
case
Protocol
:
:
UDP
:
{
int
remote_family
;
std
::
string
remote_ip
;
...
...
@@ -31,7 +73,7 @@ namespace RTC
break
;
}
case
Type
:
:
TCP
:
case
Protocol
:
:
TCP
:
{
MS_DEBUG
(
"[TCP | local: %s : %u | remote: %s : %u]"
,
this
->
tcpConnection
->
GetLocalIP
().
c_str
(),
(
unsigned
int
)
this
->
tcpConnection
->
GetLocalPort
(),
...
...
worker/src/handles/TCPConnection.cpp
浏览文件 @
22ba582c
...
...
@@ -78,7 +78,7 @@ TCPConnection::~TCPConnection()
delete
[]
this
->
buffer
;
}
void
TCPConnection
::
Setup
(
Listener
*
listener
,
const
std
::
string
&
localIP
,
MS_PORT
localPort
)
void
TCPConnection
::
Setup
(
Listener
*
listener
,
struct
sockaddr_storage
*
localAddr
,
const
std
::
string
&
localIP
,
MS_PORT
localPort
)
{
MS_TRACE
();
...
...
@@ -97,6 +97,7 @@ void TCPConnection::Setup(Listener* listener, const std::string &localIP, MS_POR
this
->
listener
=
listener
;
// Set the local address.
this
->
localAddr
=
localAddr
;
this
->
localIP
=
localIP
;
this
->
localPort
=
localPort
;
}
...
...
worker/src/handles/TCPServer.cpp
浏览文件 @
22ba582c
...
...
@@ -228,7 +228,7 @@ void TCPServer::onUvConnection(int status)
try
{
connection
->
Setup
(
this
,
this
->
localIP
,
this
->
localPort
);
connection
->
Setup
(
this
,
&
(
this
->
localAddr
),
this
->
localIP
,
this
->
localPort
);
}
catch
(
const
MediaSoupError
&
error
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论