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 19 matching lines...) Expand all Loading... |
30 #include "webrtc/p2p/base/portallocator.h" | 30 #include "webrtc/p2p/base/portallocator.h" |
31 #include "webrtc/p2p/base/portinterface.h" | 31 #include "webrtc/p2p/base/portinterface.h" |
32 #include "webrtc/p2p/base/transportchannelimpl.h" | 32 #include "webrtc/p2p/base/transportchannelimpl.h" |
33 #include "webrtc/base/asyncpacketsocket.h" | 33 #include "webrtc/base/asyncpacketsocket.h" |
34 #include "webrtc/base/sigslot.h" | 34 #include "webrtc/base/sigslot.h" |
35 | 35 |
36 namespace cricket { | 36 namespace cricket { |
37 | 37 |
38 extern const int WEAK_PING_INTERVAL; | 38 extern const int WEAK_PING_INTERVAL; |
39 | 39 |
40 struct IceParameters { | |
41 std::string ufrag; | |
42 std::string pwd; | |
43 IceParameters(const std::string& ice_ufrag, const std::string& ice_pwd) | |
44 : ufrag(ice_ufrag), pwd(ice_pwd) {} | |
45 | |
46 bool operator==(const IceParameters& other) { | |
47 return ufrag == other.ufrag && pwd == other.pwd; | |
48 } | |
49 bool operator!=(const IceParameters& other) { return !(*this == other); } | |
50 }; | |
51 | |
52 // Adds the port on which the candidate originated. | 40 // Adds the port on which the candidate originated. |
53 class RemoteCandidate : public Candidate { | 41 class RemoteCandidate : public Candidate { |
54 public: | 42 public: |
55 RemoteCandidate(const Candidate& c, PortInterface* origin_port) | 43 RemoteCandidate(const Candidate& c, PortInterface* origin_port) |
56 : Candidate(c), origin_port_(origin_port) {} | 44 : Candidate(c), origin_port_(origin_port) {} |
57 | 45 |
58 PortInterface* origin_port() { return origin_port_; } | 46 PortInterface* origin_port() { return origin_port_; } |
59 | 47 |
60 private: | 48 private: |
61 PortInterface* origin_port_; | 49 PortInterface* origin_port_; |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 TransportChannelState state_ = TransportChannelState::STATE_INIT; | 316 TransportChannelState state_ = TransportChannelState::STATE_INIT; |
329 IceConfig config_; | 317 IceConfig config_; |
330 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before. | 318 int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before. |
331 | 319 |
332 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); | 320 RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel); |
333 }; | 321 }; |
334 | 322 |
335 } // namespace cricket | 323 } // namespace cricket |
336 | 324 |
337 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ | 325 #endif // WEBRTC_P2P_BASE_P2PTRANSPORTCHANNEL_H_ |
OLD | NEW |