| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 virtual ~TCPPort(); | 48 virtual ~TCPPort(); |
| 49 | 49 |
| 50 virtual Connection* CreateConnection(const Candidate& address, | 50 virtual Connection* CreateConnection(const Candidate& address, |
| 51 CandidateOrigin origin); | 51 CandidateOrigin origin); |
| 52 | 52 |
| 53 virtual void PrepareAddress(); | 53 virtual void PrepareAddress(); |
| 54 | 54 |
| 55 virtual int GetOption(rtc::Socket::Option opt, int* value); | 55 virtual int GetOption(rtc::Socket::Option opt, int* value); |
| 56 virtual int SetOption(rtc::Socket::Option opt, int value); | 56 virtual int SetOption(rtc::Socket::Option opt, int value); |
| 57 virtual int GetError(); | 57 virtual int GetError(); |
| 58 virtual bool SupportsProtocol(const std::string& protocol) const { |
| 59 return protocol == TCP_PROTOCOL_NAME || protocol == SSLTCP_PROTOCOL_NAME; |
| 60 } |
| 58 | 61 |
| 59 protected: | 62 protected: |
| 60 TCPPort(rtc::Thread* thread, | 63 TCPPort(rtc::Thread* thread, |
| 61 rtc::PacketSocketFactory* factory, | 64 rtc::PacketSocketFactory* factory, |
| 62 rtc::Network* network, | 65 rtc::Network* network, |
| 63 const rtc::IPAddress& ip, | 66 const rtc::IPAddress& ip, |
| 64 uint16_t min_port, | 67 uint16_t min_port, |
| 65 uint16_t max_port, | 68 uint16_t max_port, |
| 66 const std::string& username, | 69 const std::string& username, |
| 67 const std::string& password, | 70 const std::string& password, |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 176 |
| 174 // Allow test case to overwrite the default timeout period. | 177 // Allow test case to overwrite the default timeout period. |
| 175 int reconnection_timeout_; | 178 int reconnection_timeout_; |
| 176 | 179 |
| 177 friend class TCPPort; | 180 friend class TCPPort; |
| 178 }; | 181 }; |
| 179 | 182 |
| 180 } // namespace cricket | 183 } // namespace cricket |
| 181 | 184 |
| 182 #endif // WEBRTC_P2P_BASE_TCPPORT_H_ | 185 #endif // WEBRTC_P2P_BASE_TCPPORT_H_ |
| OLD | NEW |