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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 virtual bool GetIceProtocolType(IceProtocolType* type) const; | 66 virtual bool GetIceProtocolType(IceProtocolType* type) const; |
67 virtual void SetIceProtocolType(IceProtocolType type); | 67 virtual void SetIceProtocolType(IceProtocolType type); |
68 virtual void SetIceCredentials(const std::string& ice_ufrag, | 68 virtual void SetIceCredentials(const std::string& ice_ufrag, |
69 const std::string& ice_pwd); | 69 const std::string& ice_pwd); |
70 virtual void SetRemoteIceCredentials(const std::string& ice_ufrag, | 70 virtual void SetRemoteIceCredentials(const std::string& ice_ufrag, |
71 const std::string& ice_pwd); | 71 const std::string& ice_pwd); |
72 virtual void SetRemoteIceMode(IceMode mode); | 72 virtual void SetRemoteIceMode(IceMode mode); |
73 virtual void Connect(); | 73 virtual void Connect(); |
74 virtual void OnSignalingReady(); | 74 virtual void OnSignalingReady(); |
75 virtual void OnCandidate(const Candidate& candidate); | 75 virtual void OnCandidate(const Candidate& candidate); |
| 76 // Sets the receiving timeout in milliseconds. |
| 77 // This also sets the check_receiving_delay proportionally. |
| 78 virtual void SetReceivingTimeout(int receiving_timeout_ms); |
76 | 79 |
77 // From TransportChannel: | 80 // From TransportChannel: |
78 virtual int SendPacket(const char *data, size_t len, | 81 virtual int SendPacket(const char *data, size_t len, |
79 const rtc::PacketOptions& options, int flags); | 82 const rtc::PacketOptions& options, int flags); |
80 virtual int SetOption(rtc::Socket::Option opt, int value); | 83 virtual int SetOption(rtc::Socket::Option opt, int value); |
81 virtual bool GetOption(rtc::Socket::Option opt, int* value); | 84 virtual bool GetOption(rtc::Socket::Option opt, int* value); |
82 virtual int GetError() { return error_; } | 85 virtual int GetError() { return error_; } |
83 virtual bool GetStats(std::vector<ConnectionInfo>* stats); | 86 virtual bool GetStats(std::vector<ConnectionInfo>* stats); |
84 | 87 |
85 const Connection* best_connection() const { return best_connection_; } | 88 const Connection* best_connection() const { return best_connection_; } |
86 void set_incoming_only(bool value) { incoming_only_ = value; } | 89 void set_incoming_only(bool value) { incoming_only_ = value; } |
87 | 90 |
88 // Sets the receiving timeout in milliseconds. | |
89 // This also sets the check_receiving_delay proportionally. | |
90 void SetReceivingTimeout(int receiving_timeout_ms) override; | |
91 | |
92 // Note: This is only for testing purpose. | 91 // Note: This is only for testing purpose. |
93 // |ports_| should not be changed from outside. | 92 // |ports_| should not be changed from outside. |
94 const std::vector<PortInterface*>& ports() { return ports_; } | 93 const std::vector<PortInterface*>& ports() { return ports_; } |
95 | 94 |
96 IceMode remote_ice_mode() const { return remote_ice_mode_; } | 95 IceMode remote_ice_mode() const { return remote_ice_mode_; } |
97 | 96 |
98 // DTLS methods. | 97 // DTLS methods. |
99 virtual bool IsDtlsActive() const { return false; } | 98 virtual bool IsDtlsActive() const { return false; } |
100 | 99 |
101 // Default implementation. | 100 // Default implementation. |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 251 |
253 int check_receiving_delay_; | 252 int check_receiving_delay_; |
254 int receiving_timeout_; | 253 int receiving_timeout_; |
255 | 254 |
256 DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); | 255 DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); |
257 }; | 256 }; |
258 | 257 |
259 } // namespace cricket | 258 } // namespace cricket |
260 | 259 |
261 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ | 260 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ |
OLD | NEW |