| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 289   // Called when the socket is currently able to send. | 289   // Called when the socket is currently able to send. | 
| 290   void OnReadyToSend(); | 290   void OnReadyToSend(); | 
| 291 | 291 | 
| 292   // Called when the Connection discovers a local peer reflexive candidate. | 292   // Called when the Connection discovers a local peer reflexive candidate. | 
| 293   // Returns the index of the new local candidate. | 293   // Returns the index of the new local candidate. | 
| 294   size_t AddPrflxCandidate(const Candidate& local); | 294   size_t AddPrflxCandidate(const Candidate& local); | 
| 295 | 295 | 
| 296   void set_candidate_filter(uint32_t candidate_filter) { | 296   void set_candidate_filter(uint32_t candidate_filter) { | 
| 297     candidate_filter_ = candidate_filter; | 297     candidate_filter_ = candidate_filter; | 
| 298   } | 298   } | 
| 299   int32_t network_cost() const { return network_cost_; } | 299   int16_t network_cost() const { return network_cost_; } | 
| 300 | 300 | 
| 301  protected: | 301  protected: | 
| 302   enum { | 302   enum { | 
| 303     MSG_DEAD = 0, | 303     MSG_DEAD = 0, | 
| 304     MSG_FIRST_AVAILABLE | 304     MSG_FIRST_AVAILABLE | 
| 305   }; | 305   }; | 
| 306 | 306 | 
| 307   void set_type(const std::string& type) { type_ = type; } | 307   void set_type(const std::string& type) { type_ = type; } | 
| 308 | 308 | 
| 309   void AddAddress(const rtc::SocketAddress& address, | 309   void AddAddress(const rtc::SocketAddress& address, | 
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 396 | 396 | 
| 397   // Candidate filter is pushed down to Port such that each Port could | 397   // Candidate filter is pushed down to Port such that each Port could | 
| 398   // make its own decision on how to create candidates. For example, | 398   // make its own decision on how to create candidates. For example, | 
| 399   // when IceTransportsType is set to relay, both RelayPort and | 399   // when IceTransportsType is set to relay, both RelayPort and | 
| 400   // TurnPort will hide raddr to avoid local address leakage. | 400   // TurnPort will hide raddr to avoid local address leakage. | 
| 401   uint32_t candidate_filter_; | 401   uint32_t candidate_filter_; | 
| 402 | 402 | 
| 403   // A virtual cost perceived by the user, usually based on the network type | 403   // A virtual cost perceived by the user, usually based on the network type | 
| 404   // (WiFi. vs. Cellular). It takes precedence over the priority when | 404   // (WiFi. vs. Cellular). It takes precedence over the priority when | 
| 405   // comparing two connections. | 405   // comparing two connections. | 
| 406   uint32_t network_cost_; | 406   uint16_t network_cost_; | 
| 407 | 407 | 
| 408   friend class Connection; | 408   friend class Connection; | 
| 409 }; | 409 }; | 
| 410 | 410 | 
| 411 // Represents a communication link between a port on the local client and a | 411 // Represents a communication link between a port on the local client and a | 
| 412 // port on the remote client. | 412 // port on the remote client. | 
| 413 class Connection : public rtc::MessageHandler, | 413 class Connection : public rtc::MessageHandler, | 
| 414     public sigslot::has_slots<> { | 414     public sigslot::has_slots<> { | 
| 415  public: | 415  public: | 
| 416   struct SentPing { | 416   struct SentPing { | 
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 665            const rtc::PacketOptions& options) override; | 665            const rtc::PacketOptions& options) override; | 
| 666   int GetError() override { return error_; } | 666   int GetError() override { return error_; } | 
| 667 | 667 | 
| 668  private: | 668  private: | 
| 669   int error_ = 0; | 669   int error_ = 0; | 
| 670 }; | 670 }; | 
| 671 | 671 | 
| 672 }  // namespace cricket | 672 }  // namespace cricket | 
| 673 | 673 | 
| 674 #endif  // WEBRTC_P2P_BASE_PORT_H_ | 674 #endif  // WEBRTC_P2P_BASE_PORT_H_ | 
| OLD | NEW | 
|---|