Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Side by Side Diff: net/tools/quic/quic_socket_utils.cc

Issue 1979763002: Landing Recent QUIC changes until Sun May 8 00:39:29 2016 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_socket_utils.h" 5 #include "net/tools/quic/quic_socket_utils.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <linux/net_tstamp.h> 8 #include <linux/net_tstamp.h>
9 #include <netinet/in.h> 9 #include <netinet/in.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 if (!SetSendBufferSize(fd, kDefaultSocketReceiveBuffer)) { 284 if (!SetSendBufferSize(fd, kDefaultSocketReceiveBuffer)) {
285 return -1; 285 return -1;
286 } 286 }
287 287
288 rc = SetGetAddressInfo(fd, address_family); 288 rc = SetGetAddressInfo(fd, address_family);
289 if (rc < 0) { 289 if (rc < 0) {
290 LOG(ERROR) << "IP detection not supported" << strerror(errno); 290 LOG(ERROR) << "IP detection not supported" << strerror(errno);
291 return -1; 291 return -1;
292 } 292 }
293 293
294 if (FLAGS_quic_use_socket_timestamp) { 294 rc = SetGetSoftwareReceiveTimestamp(fd);
295 rc = SetGetSoftwareReceiveTimestamp(fd); 295 if (rc < 0) {
296 if (rc < 0) { 296 LOG(WARNING) << "SO_TIMESTAMPING not supported; using fallback: "
297 LOG(WARNING) << "SO_TIMESTAMPING not supported; using fallback: " 297 << strerror(errno);
298 << strerror(errno);
299 }
300 } 298 }
301 299
302 return fd; 300 return fd;
303 } 301 }
304 302
305 } // namespace net 303 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_simple_server_test.cc ('k') | net/tools/quic/quic_spdy_client_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698