| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2  *  Copyright 2004 The WebRTC Project Authors. All rights reserved. | 
| 3  * | 3  * | 
| 4  *  Use of this source code is governed by a BSD-style license | 4  *  Use of this source code is governed by a BSD-style license | 
| 5  *  that can be found in the LICENSE file in the root of the source | 5  *  that can be found in the LICENSE file in the root of the source | 
| 6  *  tree. An additional intellectual property rights grant can be found | 6  *  tree. An additional intellectual property rights grant can be found | 
| 7  *  in the file PATENTS.  All contributing project authors may | 7  *  in the file PATENTS.  All contributing project authors may | 
| 8  *  be found in the AUTHORS file in the root of the source tree. | 8  *  be found in the AUTHORS file in the root of the source tree. | 
| 9  */ | 9  */ | 
| 10 | 10 | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 43                                 max_port, username, password, allow_listen); | 43                                 max_port, username, password, allow_listen); | 
| 44     if (!port->Init()) { | 44     if (!port->Init()) { | 
| 45       delete port; | 45       delete port; | 
| 46       port = NULL; | 46       port = NULL; | 
| 47     } | 47     } | 
| 48     return port; | 48     return port; | 
| 49   } | 49   } | 
| 50   ~TCPPort() override; | 50   ~TCPPort() override; | 
| 51 | 51 | 
| 52   Connection* CreateConnection(const Candidate& address, | 52   Connection* CreateConnection(const Candidate& address, | 
| 53                                CandidateOrigin origin) override; | 53                                CandidateOrigin origin, | 
|  | 54                                const IceConfig& config) override; | 
| 54 | 55 | 
| 55   void PrepareAddress() override; | 56   void PrepareAddress() override; | 
| 56 | 57 | 
| 57   int GetOption(rtc::Socket::Option opt, int* value) override; | 58   int GetOption(rtc::Socket::Option opt, int* value) override; | 
| 58   int SetOption(rtc::Socket::Option opt, int value) override; | 59   int SetOption(rtc::Socket::Option opt, int value) override; | 
| 59   int GetError() override; | 60   int GetError() override; | 
| 60   bool SupportsProtocol(const std::string& protocol) const override { | 61   bool SupportsProtocol(const std::string& protocol) const override { | 
| 61     return protocol == TCP_PROTOCOL_NAME || protocol == SSLTCP_PROTOCOL_NAME; | 62     return protocol == TCP_PROTOCOL_NAME || protocol == SSLTCP_PROTOCOL_NAME; | 
| 62   } | 63   } | 
| 63 | 64 | 
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 113   rtc::AsyncPacketSocket* socket_; | 114   rtc::AsyncPacketSocket* socket_; | 
| 114   int error_; | 115   int error_; | 
| 115   std::list<Incoming> incoming_; | 116   std::list<Incoming> incoming_; | 
| 116 | 117 | 
| 117   friend class TCPConnection; | 118   friend class TCPConnection; | 
| 118 }; | 119 }; | 
| 119 | 120 | 
| 120 class TCPConnection : public Connection { | 121 class TCPConnection : public Connection { | 
| 121  public: | 122  public: | 
| 122   // Connection is outgoing unless socket is specified | 123   // Connection is outgoing unless socket is specified | 
| 123   TCPConnection(TCPPort* port, const Candidate& candidate, | 124   TCPConnection(TCPPort* port, | 
|  | 125                 const Candidate& candidate, | 
|  | 126                 const IceConfig& config, | 
| 124                 rtc::AsyncPacketSocket* socket = 0); | 127                 rtc::AsyncPacketSocket* socket = 0); | 
| 125   ~TCPConnection() override; | 128   ~TCPConnection() override; | 
| 126 | 129 | 
| 127   int Send(const void* data, | 130   int Send(const void* data, | 
| 128            size_t size, | 131            size_t size, | 
| 129            const rtc::PacketOptions& options) override; | 132            const rtc::PacketOptions& options) override; | 
| 130   int GetError() override; | 133   int GetError() override; | 
| 131 | 134 | 
| 132   rtc::AsyncPacketSocket* socket() { return socket_.get(); } | 135   rtc::AsyncPacketSocket* socket() { return socket_.get(); } | 
| 133 | 136 | 
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 183 | 186 | 
| 184   // Allow test case to overwrite the default timeout period. | 187   // Allow test case to overwrite the default timeout period. | 
| 185   int reconnection_timeout_; | 188   int reconnection_timeout_; | 
| 186 | 189 | 
| 187   friend class TCPPort; | 190   friend class TCPPort; | 
| 188 }; | 191 }; | 
| 189 | 192 | 
| 190 }  // namespace cricket | 193 }  // namespace cricket | 
| 191 | 194 | 
| 192 #endif  // WEBRTC_P2P_BASE_TCPPORT_H_ | 195 #endif  // WEBRTC_P2P_BASE_TCPPORT_H_ | 
| OLD | NEW | 
|---|