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

Side by Side Diff: net/socket/tcp_client_socket_libevent.cc

Issue 455029: Map EPIPE to ERR_CONNECTION_RESET. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Still map EPIPE to ERR_CONNECTION_RESET Created 11 years 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 | « no previous file | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/socket/tcp_client_socket_libevent.h" 5 #include "net/socket/tcp_client_socket_libevent.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <netdb.h> 9 #include <netdb.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #endif 45 #endif
46 return ERR_IO_PENDING; 46 return ERR_IO_PENDING;
47 case EACCES: 47 case EACCES:
48 return ERR_ACCESS_DENIED; 48 return ERR_ACCESS_DENIED;
49 case ENETDOWN: 49 case ENETDOWN:
50 return ERR_INTERNET_DISCONNECTED; 50 return ERR_INTERNET_DISCONNECTED;
51 case ETIMEDOUT: 51 case ETIMEDOUT:
52 return ERR_TIMED_OUT; 52 return ERR_TIMED_OUT;
53 case ECONNRESET: 53 case ECONNRESET:
54 case ENETRESET: // Related to keep-alive 54 case ENETRESET: // Related to keep-alive
55 case EPIPE:
55 return ERR_CONNECTION_RESET; 56 return ERR_CONNECTION_RESET;
56 case ECONNABORTED: 57 case ECONNABORTED:
57 return ERR_CONNECTION_ABORTED; 58 return ERR_CONNECTION_ABORTED;
58 case ECONNREFUSED: 59 case ECONNREFUSED:
59 return ERR_CONNECTION_REFUSED; 60 return ERR_CONNECTION_REFUSED;
60 case EHOSTUNREACH: 61 case EHOSTUNREACH:
61 case ENETUNREACH: 62 case ENETUNREACH:
62 return ERR_ADDRESS_UNREACHABLE; 63 return ERR_ADDRESS_UNREACHABLE;
63 case EADDRNOTAVAIL: 64 case EADDRNOTAVAIL:
64 return ERR_ADDRESS_INVALID; 65 return ERR_ADDRESS_INVALID;
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 DoWriteCallback(result); 446 DoWriteCallback(result);
446 } 447 }
447 } 448 }
448 449
449 int TCPClientSocketLibevent::GetPeerName(struct sockaddr* name, 450 int TCPClientSocketLibevent::GetPeerName(struct sockaddr* name,
450 socklen_t* namelen) { 451 socklen_t* namelen) {
451 return ::getpeername(socket_, name, namelen); 452 return ::getpeername(socket_, name, namelen);
452 } 453 }
453 454
454 } // namespace net 455 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698