Index: webrtc/p2p/base/tcpport.h |
diff --git a/webrtc/p2p/base/tcpport.h b/webrtc/p2p/base/tcpport.h |
index 76a73f8f474fdf3600c0902d5f6d0c504cf4d15c..ce91e449057554f58f37b5ba3754c22c9c858a1a 100644 |
--- a/webrtc/p2p/base/tcpport.h |
+++ b/webrtc/p2p/base/tcpport.h |
@@ -39,13 +39,8 @@ class TCPPort : public Port { |
const std::string& username, |
const std::string& password, |
bool allow_listen) { |
- TCPPort* port = new TCPPort(thread, factory, network, ip, min_port, |
- max_port, username, password, allow_listen); |
- if (!port->Init()) { |
- delete port; |
- port = NULL; |
- } |
- return port; |
+ return new TCPPort(thread, factory, network, ip, min_port, max_port, |
+ username, password, allow_listen); |
} |
~TCPPort() override; |
@@ -73,7 +68,6 @@ class TCPPort : public Port { |
const std::string& username, |
const std::string& password, |
bool allow_listen); |
- bool Init(); |
// Handles sending using the local TCP socket. |
int SendTo(const void* data, |
@@ -92,6 +86,8 @@ class TCPPort : public Port { |
rtc::AsyncPacketSocket* socket; |
}; |
+ void TryCreateServerSocket(); |
+ |
rtc::AsyncPacketSocket* GetIncoming( |
const rtc::SocketAddress& addr, bool remove = false); |