diff --git a/webrtc/WebRtcSession.cpp b/webrtc/WebRtcSession.cpp index 1cb428f1..a87a835b 100644 --- a/webrtc/WebRtcSession.cpp +++ b/webrtc/WebRtcSession.cpp @@ -58,7 +58,6 @@ void WebRtcSession::onRecv(const Buffer::Ptr &buffer) { //只允许寻找一次transport _find_transport = false; auto user_name = getUserName(buffer); - _identifier = to_string(getSock()->rawFD()) + '-' + user_name; auto transport = WebRtcTransportManager::Instance().getItem(user_name); CHECK(transport && transport->getPoller()->isCurrentThread()); transport->setSession(shared_from_this()); @@ -97,7 +96,5 @@ void WebRtcSession::onManager() { } } -std::string WebRtcSession::getIdentifier() const { - return _identifier; -} + diff --git a/webrtc/WebRtcSession.h b/webrtc/WebRtcSession.h index dcbd079c..266407e4 100644 --- a/webrtc/WebRtcSession.h +++ b/webrtc/WebRtcSession.h @@ -24,12 +24,11 @@ public: void onRecv(const Buffer::Ptr &) override; void onError(const SockException &err) override; void onManager() override; - std::string getIdentifier() const override; + //std::string getIdentifier() const override; static EventPoller::Ptr queryPoller(const Buffer::Ptr &buffer); private: - std::string _identifier; bool _find_transport = true; Ticker _ticker; struct sockaddr_storage _peer_addr;