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

Side by Side Diff: net/socket/tcp_client_socket.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_CLIENT_SOCKET_H_ 5 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_H_
6 #define NET_SOCKET_TCP_CLIENT_SOCKET_H_ 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 virtual NextProto GetNegotiatedProtocol() const OVERRIDE; 53 virtual NextProto GetNegotiatedProtocol() const OVERRIDE;
54 virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; 54 virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE;
55 55
56 // Socket implementation. 56 // Socket implementation.
57 // Multiple outstanding requests are not supported. 57 // Multiple outstanding requests are not supported.
58 // Full duplex mode (reading and writing at the same time) is supported. 58 // Full duplex mode (reading and writing at the same time) is supported.
59 virtual int Read(IOBuffer* buf, int buf_len, 59 virtual int Read(IOBuffer* buf, int buf_len,
60 const CompletionCallback& callback) OVERRIDE; 60 const CompletionCallback& callback) OVERRIDE;
61 virtual int Write(IOBuffer* buf, int buf_len, 61 virtual int Write(IOBuffer* buf, int buf_len,
62 const CompletionCallback& callback) OVERRIDE; 62 const CompletionCallback& callback) OVERRIDE;
63 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 63 virtual int SetReceiveBufferSize(int32 size) OVERRIDE;
64 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 64 virtual int SetSendBufferSize(int32 size) OVERRIDE;
65 65
66 virtual bool SetKeepAlive(bool enable, int delay); 66 virtual bool SetKeepAlive(bool enable, int delay);
67 virtual bool SetNoDelay(bool no_delay); 67 virtual bool SetNoDelay(bool no_delay);
68 68
69 private: 69 private:
70 // State machine for connecting the socket. 70 // State machine for connecting the socket.
71 enum ConnectState { 71 enum ConnectState {
72 CONNECT_STATE_CONNECT, 72 CONNECT_STATE_CONNECT,
73 CONNECT_STATE_CONNECT_COMPLETE, 73 CONNECT_STATE_CONNECT_COMPLETE,
74 CONNECT_STATE_NONE, 74 CONNECT_STATE_NONE,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // Record of connectivity and transmissions, for use in speculative connection 112 // Record of connectivity and transmissions, for use in speculative connection
113 // histograms. 113 // histograms.
114 UseHistory use_history_; 114 UseHistory use_history_;
115 115
116 DISALLOW_COPY_AND_ASSIGN(TCPClientSocket); 116 DISALLOW_COPY_AND_ASSIGN(TCPClientSocket);
117 }; 117 };
118 118
119 } // namespace net 119 } // namespace net
120 120
121 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_H_ 121 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698