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

Side by Side Diff: net/socket/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: fix linux typo 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_SOCKET_H_ 5 #ifndef NET_SOCKET_SOCKET_H_
6 #define NET_SOCKET_SOCKET_H_ 6 #define NET_SOCKET_SOCKET_H_
7 7
8 #include "net/base/completion_callback.h" 8 #include "net/base/completion_callback.h"
9 #include "net/base/net_export.h" 9 #include "net/base/net_export.h"
10 10
(...skipping 30 matching lines...) Expand all
41 // operation is not completed immediately, the socket acquires a reference to 41 // operation is not completed immediately, the socket acquires a reference to
42 // the provided buffer until the callback is invoked or the socket is 42 // the provided buffer until the callback is invoked or the socket is
43 // closed. Implementations of this method should not modify the contents 43 // closed. Implementations of this method should not modify the contents
44 // of the actual buffer that is written to the socket. If the socket is 44 // of the actual buffer that is written to the socket. If the socket is
45 // Disconnected before the write completes, the callback will not be invoked. 45 // Disconnected before the write completes, the callback will not be invoked.
46 virtual int Write(IOBuffer* buf, int buf_len, 46 virtual int Write(IOBuffer* buf, int buf_len,
47 const CompletionCallback& callback) = 0; 47 const CompletionCallback& callback) = 0;
48 48
49 // Set the receive buffer size (in bytes) for the socket. 49 // Set the receive buffer size (in bytes) for the socket.
50 // Note: changing this value can affect the TCP window size on some platforms. 50 // Note: changing this value can affect the TCP window size on some platforms.
51 // Returns true on success, or false on failure. 51 // Returns a net error code.
52 virtual bool SetReceiveBufferSize(int32 size) = 0; 52 virtual int SetReceiveBufferSize(int32 size) = 0;
53 53
54 // Set the send buffer size (in bytes) for the socket. 54 // Set the send buffer size (in bytes) for the socket.
55 // Note: changing this value can affect the TCP window size on some platforms. 55 // Note: changing this value can affect the TCP window size on some platforms.
56 // Returns true on success, or false on failure. 56 // Returns a net error code.
57 virtual bool SetSendBufferSize(int32 size) = 0; 57 virtual int SetSendBufferSize(int32 size) = 0;
58 }; 58 };
59 59
60 } // namespace net 60 } // namespace net
61 61
62 #endif // NET_SOCKET_SOCKET_H_ 62 #endif // NET_SOCKET_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698