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

Side by Side Diff: net/socket/tcp_socket_win.h

Issue 227473008: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Original CL, as was submitted, and previously reverted Created 6 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef NET_SOCKET_TCP_SOCKET_WIN_H_ 5 #ifndef NET_SOCKET_TCP_SOCKET_WIN_H_
6 #define NET_SOCKET_TCP_SOCKET_WIN_H_ 6 #define NET_SOCKET_TCP_SOCKET_WIN_H_
7 7
8 #include <winsock2.h> 8 #include <winsock2.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Sets various socket options. 56 // Sets various socket options.
57 // The commonly used options for server listening sockets: 57 // The commonly used options for server listening sockets:
58 // - SetExclusiveAddrUse(). 58 // - SetExclusiveAddrUse().
59 int SetDefaultOptionsForServer(); 59 int SetDefaultOptionsForServer();
60 // The commonly used options for client sockets and accepted sockets: 60 // The commonly used options for client sockets and accepted sockets:
61 // - Increase the socket buffer sizes for WinXP; 61 // - Increase the socket buffer sizes for WinXP;
62 // - SetNoDelay(true); 62 // - SetNoDelay(true);
63 // - SetKeepAlive(true, 45). 63 // - SetKeepAlive(true, 45).
64 void SetDefaultOptionsForClient(); 64 void SetDefaultOptionsForClient();
65 int SetExclusiveAddrUse(); 65 int SetExclusiveAddrUse();
66 bool SetReceiveBufferSize(int32 size); 66 int SetReceiveBufferSize(int32 size);
67 bool SetSendBufferSize(int32 size); 67 int SetSendBufferSize(int32 size);
68 bool SetKeepAlive(bool enable, int delay); 68 bool SetKeepAlive(bool enable, int delay);
69 bool SetNoDelay(bool no_delay); 69 bool SetNoDelay(bool no_delay);
70 70
71 void Close(); 71 void Close();
72 72
73 bool UsingTCPFastOpen() const; 73 bool UsingTCPFastOpen() const;
74 bool IsValid() const { return socket_ != INVALID_SOCKET; } 74 bool IsValid() const { return socket_ != INVALID_SOCKET; }
75 75
76 // Marks the start/end of a series of connect attempts for logging purpose. 76 // Marks the start/end of a series of connect attempts for logging purpose.
77 // 77 //
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 BoundNetLog net_log_; 142 BoundNetLog net_log_;
143 143
144 DISALLOW_COPY_AND_ASSIGN(TCPSocketWin); 144 DISALLOW_COPY_AND_ASSIGN(TCPSocketWin);
145 }; 145 };
146 146
147 } // namespace net 147 } // namespace net
148 148
149 #endif // NET_SOCKET_TCP_SOCKET_WIN_H_ 149 #endif // NET_SOCKET_TCP_SOCKET_WIN_H_
150 150
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698