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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
686 int64_t last_ping_response_received_; | 686 int64_t last_ping_response_received_; |
687 int64_t receiving_unchanged_since_ = 0; | 687 int64_t receiving_unchanged_since_ = 0; |
688 std::vector<SentPing> pings_since_last_response_; | 688 std::vector<SentPing> pings_since_last_response_; |
689 | 689 |
690 void MaybeAddPrflxCandidate(ConnectionRequest* request, | 690 void MaybeAddPrflxCandidate(ConnectionRequest* request, |
691 StunMessage* response); | 691 StunMessage* response); |
692 | 692 |
693 bool reported_; | 693 bool reported_; |
694 State state_; | 694 State state_; |
695 // Time duration to switch from receiving to not receiving. | 695 // Time duration to switch from receiving to not receiving. |
696 int receiving_timeout_; | 696 int64_t receiving_timeout_; |
honghaiz3
2016/08/10 17:09:23
This is a delta-time, so 32 bits should be suffici
| |
697 int64_t time_created_ms_; | 697 int64_t time_created_ms_; |
698 int num_pings_sent_ = 0; | 698 int num_pings_sent_ = 0; |
699 | 699 |
700 friend class Port; | 700 friend class Port; |
701 friend class ConnectionRequest; | 701 friend class ConnectionRequest; |
702 }; | 702 }; |
703 | 703 |
704 // ProxyConnection defers all the interesting work to the port. | 704 // ProxyConnection defers all the interesting work to the port. |
705 class ProxyConnection : public Connection { | 705 class ProxyConnection : public Connection { |
706 public: | 706 public: |
707 ProxyConnection(Port* port, size_t index, const Candidate& remote_candidate); | 707 ProxyConnection(Port* port, size_t index, const Candidate& remote_candidate); |
708 | 708 |
709 int Send(const void* data, | 709 int Send(const void* data, |
710 size_t size, | 710 size_t size, |
711 const rtc::PacketOptions& options) override; | 711 const rtc::PacketOptions& options) override; |
712 int GetError() override { return error_; } | 712 int GetError() override { return error_; } |
713 | 713 |
714 private: | 714 private: |
715 int error_ = 0; | 715 int error_ = 0; |
716 }; | 716 }; |
717 | 717 |
718 } // namespace cricket | 718 } // namespace cricket |
719 | 719 |
720 #endif // WEBRTC_P2P_BASE_PORT_H_ | 720 #endif // WEBRTC_P2P_BASE_PORT_H_ |
OLD | NEW |