dtls环境自动初始化,支持多线程

This commit is contained in:
ziyue
2021-03-27 10:03:19 +08:00
parent 0d4cc2fc65
commit d0a1c72fda
3 changed files with 84 additions and 81 deletions

View File

@@ -3,10 +3,6 @@
#include "Rtcp/Rtcp.h"
WebRtcTransport::WebRtcTransport() {
static onceToken token([](){
RTC::DtlsTransport::ClassInit();
});
dtls_transport_ = std::make_shared<RTC::DtlsTransport>(EventPollerPool::Instance().getFirstPoller(), this);
ice_server_ = std::make_shared<RTC::IceServer>(this, makeRandStr(4), makeRandStr(24));
}