OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // A class to read incoming QUIC packets from the UDP socket. | 5 // A class to read incoming QUIC packets from the UDP socket. |
6 | 6 |
7 #ifndef NET_TOOLS_QUIC_QUIC_PACKET_READER_H_ | 7 #ifndef NET_TOOLS_QUIC_QUIC_PACKET_READER_H_ |
8 #define NET_TOOLS_QUIC_QUIC_PACKET_READER_H_ | 8 #define NET_TOOLS_QUIC_QUIC_PACKET_READER_H_ |
9 | 9 |
10 #include <netinet/in.h> | 10 #include <netinet/in.h> |
11 #include <sys/socket.h> | 11 #include <sys/socket.h> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "net/quic/quic_clock.h" | 14 #include "net/quic/core/quic_clock.h" |
15 #include "net/quic/quic_protocol.h" | 15 #include "net/quic/core/quic_protocol.h" |
16 #include "net/tools/quic/quic_process_packet_interface.h" | 16 #include "net/tools/quic/quic_process_packet_interface.h" |
17 #include "net/tools/quic/quic_socket_utils.h" | 17 #include "net/tools/quic/quic_socket_utils.h" |
18 | 18 |
19 #define MMSG_MORE 0 | 19 #define MMSG_MORE 0 |
20 | 20 |
21 namespace net { | 21 namespace net { |
22 | 22 |
23 #if MMSG_MORE | 23 #if MMSG_MORE |
24 // Read in larger batches to minimize recvmmsg overhead. | 24 // Read in larger batches to minimize recvmmsg overhead. |
25 const int kNumPacketsPerReadMmsgCall = 16; | 25 const int kNumPacketsPerReadMmsgCall = 16; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 PacketData packets_[kNumPacketsPerReadMmsgCall]; | 89 PacketData packets_[kNumPacketsPerReadMmsgCall]; |
90 mmsghdr mmsg_hdr_[kNumPacketsPerReadMmsgCall]; | 90 mmsghdr mmsg_hdr_[kNumPacketsPerReadMmsgCall]; |
91 #endif | 91 #endif |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(QuicPacketReader); | 93 DISALLOW_COPY_AND_ASSIGN(QuicPacketReader); |
94 }; | 94 }; |
95 | 95 |
96 } // namespace net | 96 } // namespace net |
97 | 97 |
98 #endif // NET_TOOLS_QUIC_QUIC_PACKET_READER_H_ | 98 #endif // NET_TOOLS_QUIC_QUIC_PACKET_READER_H_ |
OLD | NEW |