add rtc tcp port config and ignore candidate when port is 0

This commit is contained in:
xiongguangjie
2022-11-19 01:51:53 +08:00
parent 89959ef02f
commit 0d6fa1281a
5 changed files with 19 additions and 4 deletions

View File

@@ -292,6 +292,7 @@ int start_main(int argc,char *argv[]) {
return Socket::createSocket(new_poller, false);
});
uint16_t rtcPort = mINI::Instance()[Rtc::kPort];
uint16_t rtcTcpPort = mINI::Instance()[Rtc::kTcpPort];
#endif//defined(ENABLE_WEBRTC)
@@ -338,7 +339,10 @@ int start_main(int argc,char *argv[]) {
#if defined(ENABLE_WEBRTC)
//webrtc udp服务器
if (rtcPort) { rtcSrv_udp->start<WebRtcSession>(rtcPort); rtcSrv_tcp->start<WebRtcSession>(rtcPort); }
if (rtcPort) { rtcSrv_udp->start<WebRtcSession>(rtcPort);}
if (rtcTcpPort) { rtcSrv_tcp->start<WebRtcSession>(rtcTcpPort);}
#endif//defined(ENABLE_WEBRTC)
#if defined(ENABLE_SRT)