| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // From TransportChannel: | 111 // From TransportChannel: |
| 112 int SendPacket(const char* data, | 112 int SendPacket(const char* data, |
| 113 size_t len, | 113 size_t len, |
| 114 const rtc::PacketOptions& options, | 114 const rtc::PacketOptions& options, |
| 115 int flags) override; | 115 int flags) override; |
| 116 int SetOption(rtc::Socket::Option opt, int value) override; | 116 int SetOption(rtc::Socket::Option opt, int value) override; |
| 117 bool GetOption(rtc::Socket::Option opt, int* value) override; | 117 bool GetOption(rtc::Socket::Option opt, int* value) override; |
| 118 int GetError() override { return error_; } | 118 int GetError() override { return error_; } |
| 119 bool GetStats(std::vector<ConnectionInfo>* stats) override; | 119 bool GetStats(std::vector<ConnectionInfo>* stats) override; |
| 120 | 120 |
| 121 // TODO(honghaiz): Remove this method once the reference of it in |
| 122 // Chromoting is removed. |
| 123 const Connection* best_connection() const { return selected_connection_; } |
| 124 |
| 121 const Connection* selected_connection() const { return selected_connection_; } | 125 const Connection* selected_connection() const { return selected_connection_; } |
| 122 void set_incoming_only(bool value) { incoming_only_ = value; } | 126 void set_incoming_only(bool value) { incoming_only_ = value; } |
| 123 | 127 |
| 124 // Note: This is only for testing purpose. | 128 // Note: This is only for testing purpose. |
| 125 // |ports_| should not be changed from outside. | 129 // |ports_| should not be changed from outside. |
| 126 const std::vector<PortInterface*>& ports() { return ports_; } | 130 const std::vector<PortInterface*>& ports() { return ports_; } |
| 127 | 131 |
| 128 IceMode remote_ice_mode() const { return remote_ice_mode_; } | 132 IceMode remote_ice_mode() const { return remote_ice_mode_; } |
| 129 | 133 |
| 130 // DTLS methods. | 134 // DTLS methods. |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 TransportChannelState state_ = TransportChannelState::STATE_INIT; | 366 TransportChannelState state_ = TransportChannelState::STATE_INIT; |
| 363 IceConfig config_; | 367 IceConfig config_; |
| 364 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before. | 368 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before. |
| 365 | 369 |
| 366 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); | 370 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); |
| 367 }; | 371 }; |
| 368 | 372 |
| 369 } // namespace cricket | 373 } // namespace cricket |
| 370 | 374 |
| 371 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ | 375 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ |
| OLD | NEW |