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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
516 void set_receiving_timeout(int64_t receiving_timeout_ms) { | 516 void set_receiving_timeout(int64_t receiving_timeout_ms) { |
517 receiving_timeout_ = receiving_timeout_ms; | 517 receiving_timeout_ = receiving_timeout_ms; |
518 } | 518 } |
519 | 519 |
520 // Makes the connection go away. | 520 // Makes the connection go away. |
521 void Destroy(); | 521 void Destroy(); |
522 | 522 |
523 // Makes the connection go away, in a failed state. | 523 // Makes the connection go away, in a failed state. |
524 void FailAndDestroy(); | 524 void FailAndDestroy(); |
525 | 525 |
526 // Prunes the connection and sets its state to STATE_FAILED, | |
527 // It will not be used or pinged except that it can still receive packets. | |
pthatcher1
2016/06/22 18:43:34
I will not be used or send pings, right? "be ping
| |
528 void FailAndPrune(); | |
529 | |
526 // Checks that the state of this connection is up-to-date. The argument is | 530 // Checks that the state of this connection is up-to-date. The argument is |
527 // the current time, which is compared against various timeouts. | 531 // the current time, which is compared against various timeouts. |
528 void UpdateState(int64_t now); | 532 void UpdateState(int64_t now); |
529 | 533 |
530 // Called when this connection should try checking writability again. | 534 // Called when this connection should try checking writability again. |
531 int64_t last_ping_sent() const { return last_ping_sent_; } | 535 int64_t last_ping_sent() const { return last_ping_sent_; } |
532 void Ping(int64_t now); | 536 void Ping(int64_t now); |
533 void ReceivedPingResponse(int rtt); | 537 void ReceivedPingResponse(int rtt); |
534 int64_t last_ping_response_received() const { | 538 int64_t last_ping_response_received() const { |
535 return last_ping_response_received_; | 539 return last_ping_response_received_; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
674 const rtc::PacketOptions& options) override; | 678 const rtc::PacketOptions& options) override; |
675 int GetError() override { return error_; } | 679 int GetError() override { return error_; } |
676 | 680 |
677 private: | 681 private: |
678 int error_ = 0; | 682 int error_ = 0; |
679 }; | 683 }; |
680 | 684 |
681 } // namespace cricket | 685 } // namespace cricket |
682 | 686 |
683 #endif // WEBRTC_P2P_BASE_PORT_H_ | 687 #endif // WEBRTC_P2P_BASE_PORT_H_ |
OLD | NEW |