OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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_packet_reader.h" | 5 #include "net/quic/quic_packet_reader.h" |
6 | 6 |
| 7 #include "base/message_loop/message_loop.h" |
7 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
8 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
9 | 10 |
10 namespace net { | 11 namespace net { |
11 | 12 |
12 QuicPacketReader::QuicPacketReader(DatagramClientSocket* socket, | 13 QuicPacketReader::QuicPacketReader(DatagramClientSocket* socket, |
13 Visitor* visitor, | 14 Visitor* visitor, |
14 const BoundNetLog& net_log) | 15 const BoundNetLog& net_log) |
15 : socket_(socket), | 16 : socket_(socket), |
16 visitor_(visitor), | 17 visitor_(visitor), |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 IPEndPoint peer_address; | 68 IPEndPoint peer_address; |
68 socket_->GetLocalAddress(&local_address); | 69 socket_->GetLocalAddress(&local_address); |
69 socket_->GetPeerAddress(&peer_address); | 70 socket_->GetPeerAddress(&peer_address); |
70 if (!visitor_->OnPacket(packet, local_address, peer_address)) | 71 if (!visitor_->OnPacket(packet, local_address, peer_address)) |
71 return; | 72 return; |
72 | 73 |
73 StartReading(); | 74 StartReading(); |
74 } | 75 } |
75 | 76 |
76 } // namespace net | 77 } // namespace net |
OLD | NEW |