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 send pings although it can still receive packets. | |
528 void FailAndPrune(); | |
529 | |
530 // Checks that the state of this connection is up-to-date. The argument is | 526 // Checks that the state of this connection is up-to-date. The argument is |
531 // the current time, which is compared against various timeouts. | 527 // the current time, which is compared against various timeouts. |
532 void UpdateState(int64_t now); | 528 void UpdateState(int64_t now); |
533 | 529 |
534 // Called when this connection should try checking writability again. | 530 // Called when this connection should try checking writability again. |
535 int64_t last_ping_sent() const { return last_ping_sent_; } | 531 int64_t last_ping_sent() const { return last_ping_sent_; } |
536 void Ping(int64_t now); | 532 void Ping(int64_t now); |
537 void ReceivedPingResponse(int rtt); | 533 void ReceivedPingResponse(int rtt); |
538 int64_t last_ping_response_received() const { | 534 int64_t last_ping_response_received() const { |
539 return last_ping_response_received_; | 535 return last_ping_response_received_; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 const rtc::PacketOptions& options) override; | 674 const rtc::PacketOptions& options) override; |
679 int GetError() override { return error_; } | 675 int GetError() override { return error_; } |
680 | 676 |
681 private: | 677 private: |
682 int error_ = 0; | 678 int error_ = 0; |
683 }; | 679 }; |
684 | 680 |
685 } // namespace cricket | 681 } // namespace cricket |
686 | 682 |
687 #endif // WEBRTC_P2P_BASE_PORT_H_ | 683 #endif // WEBRTC_P2P_BASE_PORT_H_ |
OLD | NEW |