OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/quic/quic_protocol.h" | 5 #include "net/quic/quic_protocol.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "net/quic/quic_utils.h" | 8 #include "net/quic/quic_utils.h" |
9 | 9 |
10 using base::StringPiece; | 10 using base::StringPiece; |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 congestion_frame.inter_arrival; | 512 congestion_frame.inter_arrival; |
513 os << " received packets: [ "; | 513 os << " received packets: [ "; |
514 for (TimeMap::const_iterator it = | 514 for (TimeMap::const_iterator it = |
515 inter_arrival.received_packet_times.begin(); | 515 inter_arrival.received_packet_times.begin(); |
516 it != inter_arrival.received_packet_times.end(); ++it) { | 516 it != inter_arrival.received_packet_times.end(); ++it) { |
517 os << it->first << "@" << it->second.ToDebuggingValue() << " "; | 517 os << it->first << "@" << it->second.ToDebuggingValue() << " "; |
518 } | 518 } |
519 os << "]"; | 519 os << "]"; |
520 break; | 520 break; |
521 } | 521 } |
522 case kFixRate: { | |
523 os << " bitrate_in_bytes_per_second: " | |
524 << congestion_frame.fix_rate.bitrate.ToBytesPerSecond(); | |
525 break; | |
526 } | |
527 case kTCP: { | 522 case kTCP: { |
528 const CongestionFeedbackMessageTCP& tcp = congestion_frame.tcp; | 523 const CongestionFeedbackMessageTCP& tcp = congestion_frame.tcp; |
529 os << " receive_window: " << tcp.receive_window; | 524 os << " receive_window: " << tcp.receive_window; |
530 break; | 525 break; |
531 } | 526 } |
532 } | 527 } |
533 return os; | 528 return os; |
534 } | 529 } |
535 | 530 |
536 CongestionFeedbackMessageFixRate::CongestionFeedbackMessageFixRate() | |
537 : bitrate(QuicBandwidth::Zero()) { | |
538 } | |
539 | |
540 QuicGoAwayFrame::QuicGoAwayFrame() | 531 QuicGoAwayFrame::QuicGoAwayFrame() |
541 : error_code(QUIC_NO_ERROR), | 532 : error_code(QUIC_NO_ERROR), |
542 last_good_stream_id(0) { | 533 last_good_stream_id(0) { |
543 } | 534 } |
544 | 535 |
545 QuicGoAwayFrame::QuicGoAwayFrame(QuicErrorCode error_code, | 536 QuicGoAwayFrame::QuicGoAwayFrame(QuicErrorCode error_code, |
546 QuicStreamId last_good_stream_id, | 537 QuicStreamId last_good_stream_id, |
547 const string& reason) | 538 const string& reason) |
548 : error_code(error_code), | 539 : error_code(error_code), |
549 last_good_stream_id(last_good_stream_id), | 540 last_good_stream_id(last_good_stream_id), |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 sent_time(QuicTime::Zero()), | 767 sent_time(QuicTime::Zero()), |
777 bytes_sent(0), | 768 bytes_sent(0), |
778 nack_count(0), | 769 nack_count(0), |
779 transmission_type(transmission_type), | 770 transmission_type(transmission_type), |
780 all_transmissions(all_transmissions), | 771 all_transmissions(all_transmissions), |
781 in_flight(false) { | 772 in_flight(false) { |
782 all_transmissions->insert(sequence_number); | 773 all_transmissions->insert(sequence_number); |
783 } | 774 } |
784 | 775 |
785 } // namespace net | 776 } // namespace net |
OLD | NEW |