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/tools/quic/quic_server.h" | 5 #include "net/tools/quic/quic_server.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #ifndef __APPLE__ | 8 #ifndef __APPLE__ |
9 // This is a GNU header that is not present in /usr/include on MacOS | 9 // This is a GNU header that is not present in /usr/include on MacOS |
10 #include <features.h> | 10 #include <features.h> |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 | 280 |
281 if (bytes_read < 0) { | 281 if (bytes_read < 0) { |
282 return false; // We failed to read. | 282 return false; // We failed to read. |
283 } | 283 } |
284 | 284 |
285 QuicEncryptedPacket packet(buf, bytes_read, false); | 285 QuicEncryptedPacket packet(buf, bytes_read, false); |
286 | 286 |
287 IPEndPoint server_address(server_ip, port); | 287 IPEndPoint server_address(server_ip, port); |
288 processor->ProcessPacket(server_address, client_address, packet); | 288 processor->ProcessPacket(server_address, client_address, packet); |
289 | 289 |
| 290 // The socket read was successful, so return true even if packet dispatch |
| 291 // failed. |
290 return true; | 292 return true; |
291 } | 293 } |
292 | 294 |
293 } // namespace tools | 295 } // namespace tools |
294 } // namespace net | 296 } // namespace net |
OLD | NEW |