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

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

Issue 131743009: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use size_t instead of int to fix win_x64 compile error Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « net/tools/quic/quic_server_test.cc ('k') | net/tools/quic/quic_spdy_client_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <netinet/in.h> 8 #include <netinet/in.h>
9 #include <string.h> 9 #include <string.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
11 #include <sys/uio.h> 11 #include <sys/uio.h>
12 #include <string> 12 #include <string>
13 13
14 #include "base/basictypes.h"
14 #include "base/logging.h" 15 #include "base/logging.h"
15 #include "net/quic/quic_protocol.h" 16 #include "net/quic/quic_protocol.h"
16 17
17 #ifndef SO_RXQ_OVFL 18 #ifndef SO_RXQ_OVFL
18 #define SO_RXQ_OVFL 40 19 #define SO_RXQ_OVFL 40
19 #endif 20 #endif
20 21
21 namespace net { 22 namespace net {
22 namespace tools { 23 namespace tools {
23 24
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 int rc = sendmsg(fd, &hdr, 0); 195 int rc = sendmsg(fd, &hdr, 0);
195 if (rc >= 0) { 196 if (rc >= 0) {
196 return WriteResult(WRITE_STATUS_OK, rc); 197 return WriteResult(WRITE_STATUS_OK, rc);
197 } 198 }
198 return WriteResult((errno == EAGAIN || errno == EWOULDBLOCK) ? 199 return WriteResult((errno == EAGAIN || errno == EWOULDBLOCK) ?
199 WRITE_STATUS_BLOCKED : WRITE_STATUS_ERROR, errno); 200 WRITE_STATUS_BLOCKED : WRITE_STATUS_ERROR, errno);
200 } 201 }
201 202
202 } // namespace tools 203 } // namespace tools
203 } // namespace net 204 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server_test.cc ('k') | net/tools/quic/quic_spdy_client_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698