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

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

Issue 2099563004: Start ICE connectivity checks as soon as the first pair is pingable. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removing debug log message, adding missing UpdateState. Created 4 years, 5 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
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel_unittest.cc ('k') | webrtc/p2p/base/port.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 586
587 // If |remote_candidate_| is peer reflexive and is equivalent to 587 // If |remote_candidate_| is peer reflexive and is equivalent to
588 // |new_candidate| except the type, update |remote_candidate_| to 588 // |new_candidate| except the type, update |remote_candidate_| to
589 // |new_candidate|. 589 // |new_candidate|.
590 void MaybeUpdatePeerReflexiveCandidate(const Candidate& new_candidate); 590 void MaybeUpdatePeerReflexiveCandidate(const Candidate& new_candidate);
591 591
592 // Returns the last received time of any data, stun request, or stun 592 // Returns the last received time of any data, stun request, or stun
593 // response in milliseconds 593 // response in milliseconds
594 int64_t last_received() const; 594 int64_t last_received() const;
595 595
596 bool stable(int64_t now); 596 bool stable(int64_t now) const;
597 597
598 protected: 598 protected:
599 enum { MSG_DELETE = 0, MSG_FIRST_AVAILABLE }; 599 enum { MSG_DELETE = 0, MSG_FIRST_AVAILABLE };
600 600
601 // Constructs a new connection to the given remote port. 601 // Constructs a new connection to the given remote port.
602 Connection(Port* port, size_t index, const Candidate& candidate); 602 Connection(Port* port, size_t index, const Candidate& candidate);
603 603
604 // Called back when StunRequestManager has a stun packet to send 604 // Called back when StunRequestManager has a stun packet to send
605 void OnSendStunPacket(const void* data, size_t size, StunRequest* req); 605 void OnSendStunPacket(const void* data, size_t size, StunRequest* req);
606 606
607 // Callbacks from ConnectionRequest 607 // Callbacks from ConnectionRequest
608 virtual void OnConnectionRequestResponse(ConnectionRequest* req, 608 virtual void OnConnectionRequestResponse(ConnectionRequest* req,
609 StunMessage* response); 609 StunMessage* response);
610 void OnConnectionRequestErrorResponse(ConnectionRequest* req, 610 void OnConnectionRequestErrorResponse(ConnectionRequest* req,
611 StunMessage* response); 611 StunMessage* response);
612 void OnConnectionRequestTimeout(ConnectionRequest* req); 612 void OnConnectionRequestTimeout(ConnectionRequest* req);
613 void OnConnectionRequestSent(ConnectionRequest* req); 613 void OnConnectionRequestSent(ConnectionRequest* req);
614 614
615 bool rtt_converged(); 615 bool rtt_converged() const;
616 616
617 // If the response is not received within 2 * RTT, the response is assumed to 617 // If the response is not received within 2 * RTT, the response is assumed to
618 // be missing. 618 // be missing.
619 bool missing_responses(int64_t now); 619 bool missing_responses(int64_t now) const;
620 620
621 // Changes the state and signals if necessary. 621 // Changes the state and signals if necessary.
622 void set_write_state(WriteState value); 622 void set_write_state(WriteState value);
623 void set_receiving(bool value); 623 void set_receiving(bool value);
624 void set_state(State state); 624 void set_state(State state);
625 void set_connected(bool value); 625 void set_connected(bool value);
626 626
627 void OnMessage(rtc::Message *pmsg); 627 void OnMessage(rtc::Message *pmsg);
628 628
629 Port* port_; 629 Port* port_;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 const rtc::PacketOptions& options) override; 682 const rtc::PacketOptions& options) override;
683 int GetError() override { return error_; } 683 int GetError() override { return error_; }
684 684
685 private: 685 private:
686 int error_ = 0; 686 int error_ = 0;
687 }; 687 };
688 688
689 } // namespace cricket 689 } // namespace cricket
690 690
691 #endif // WEBRTC_P2P_BASE_PORT_H_ 691 #endif // WEBRTC_P2P_BASE_PORT_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel_unittest.cc ('k') | webrtc/p2p/base/port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698