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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 void Destroy(); | 515 void Destroy(); |
516 | 516 |
517 // Checks that the state of this connection is up-to-date. The argument is | 517 // Checks that the state of this connection is up-to-date. The argument is |
518 // the current time, which is compared against various timeouts. | 518 // the current time, which is compared against various timeouts. |
519 void UpdateState(uint32_t now); | 519 void UpdateState(uint32_t now); |
520 | 520 |
521 // Called when this connection should try checking writability again. | 521 // Called when this connection should try checking writability again. |
522 uint32_t last_ping_sent() const { return last_ping_sent_; } | 522 uint32_t last_ping_sent() const { return last_ping_sent_; } |
523 void Ping(uint32_t now); | 523 void Ping(uint32_t now); |
524 void ReceivedPingResponse(); | 524 void ReceivedPingResponse(); |
| 525 uint32_t last_ping_response_received() const { |
| 526 return last_ping_response_received_; |
| 527 } |
525 | 528 |
526 // Called whenever a valid ping is received on this connection. This is | 529 // Called whenever a valid ping is received on this connection. This is |
527 // public because the connection intercepts the first ping for us. | 530 // public because the connection intercepts the first ping for us. |
528 uint32_t last_ping_received() const { return last_ping_received_; } | 531 uint32_t last_ping_received() const { return last_ping_received_; } |
529 void ReceivedPing(); | 532 void ReceivedPing(); |
530 // Handles the binding request; sends a response if this is a valid request. | 533 // Handles the binding request; sends a response if this is a valid request. |
531 void HandleBindingRequest(IceMessage* msg); | 534 void HandleBindingRequest(IceMessage* msg); |
532 | 535 |
533 // Debugging description of this connection | 536 // Debugging description of this connection |
534 std::string ToDebugId() const; | 537 std::string ToDebugId() const; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 const rtc::PacketOptions& options); | 646 const rtc::PacketOptions& options); |
644 virtual int GetError() { return error_; } | 647 virtual int GetError() { return error_; } |
645 | 648 |
646 private: | 649 private: |
647 int error_; | 650 int error_; |
648 }; | 651 }; |
649 | 652 |
650 } // namespace cricket | 653 } // namespace cricket |
651 | 654 |
652 #endif // WEBRTC_P2P_BASE_PORT_H_ | 655 #endif // WEBRTC_P2P_BASE_PORT_H_ |
OLD | NEW |