Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1238)

Side by Side Diff: webrtc/p2p/base/port.h

Issue 1944003002: Increase the stun ping interval. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Minor format change. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 578
579 // If |remote_candidate_| is peer reflexive and is equivalent to 579 // If |remote_candidate_| is peer reflexive and is equivalent to
580 // |new_candidate| except the type, update |remote_candidate_| to 580 // |new_candidate| except the type, update |remote_candidate_| to
581 // |new_candidate|. 581 // |new_candidate|.
582 void MaybeUpdatePeerReflexiveCandidate(const Candidate& new_candidate); 582 void MaybeUpdatePeerReflexiveCandidate(const Candidate& new_candidate);
583 583
584 // Returns the last received time of any data, stun request, or stun 584 // Returns the last received time of any data, stun request, or stun
585 // response in milliseconds 585 // response in milliseconds
586 int64_t last_received() const; 586 int64_t last_received() const;
587 587
588 std::vector<SentPing> pings_since_last_response() const {
589 return pings_since_last_response_;
590 }
591
588 protected: 592 protected:
589 enum { MSG_DELETE = 0, MSG_FIRST_AVAILABLE }; 593 enum { MSG_DELETE = 0, MSG_FIRST_AVAILABLE };
590 594
591 // Constructs a new connection to the given remote port. 595 // Constructs a new connection to the given remote port.
592 Connection(Port* port, size_t index, const Candidate& candidate); 596 Connection(Port* port, size_t index, const Candidate& candidate);
593 597
594 // Called back when StunRequestManager has a stun packet to send 598 // Called back when StunRequestManager has a stun packet to send
595 void OnSendStunPacket(const void* data, size_t size, StunRequest* req); 599 void OnSendStunPacket(const void* data, size_t size, StunRequest* req);
596 600
597 // Callbacks from ConnectionRequest 601 // Callbacks from ConnectionRequest
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 const rtc::PacketOptions& options) override; 669 const rtc::PacketOptions& options) override;
666 int GetError() override { return error_; } 670 int GetError() override { return error_; }
667 671
668 private: 672 private:
669 int error_ = 0; 673 int error_ = 0;
670 }; 674 };
671 675
672 } // namespace cricket 676 } // namespace cricket
673 677
674 #endif // WEBRTC_P2P_BASE_PORT_H_ 678 #endif // WEBRTC_P2P_BASE_PORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698