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

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

Issue 199048: Add methods for setting socket buffers to the Socket (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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/socket/client_socket_pool_base_unittest.cc ('k') | net/socket/socket_test_util.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) 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 #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 9
10 namespace net { 10 namespace net {
(...skipping 19 matching lines...) Expand all
30 // data may be written! The number of bytes written is returned, or an error 30 // data may be written! The number of bytes written is returned, or an error
31 // is returned upon failure. ERR_IO_PENDING is returned if the operation 31 // is returned upon failure. ERR_IO_PENDING is returned if the operation
32 // could not be completed synchronously, in which case the result will be 32 // could not be completed synchronously, in which case the result will be
33 // passed to the callback when available. If the operation is not completed 33 // passed to the callback when available. If the operation is not completed
34 // immediately, the socket acquires a reference to the provided buffer until 34 // immediately, the socket acquires a reference to the provided buffer until
35 // the callback is invoked or the socket is destroyed. 35 // the callback is invoked or the socket is destroyed.
36 // Implementations of this method should not modify the contents of the actual 36 // Implementations of this method should not modify the contents of the actual
37 // buffer that is written to the socket. 37 // buffer that is written to the socket.
38 virtual int Write(IOBuffer* buf, int buf_len, 38 virtual int Write(IOBuffer* buf, int buf_len,
39 CompletionCallback* callback) = 0; 39 CompletionCallback* callback) = 0;
40
41 // Set the receive buffer size (in bytes) for the socket.
42 // Note: changing this value can effect the TCP window size on some platforms.
43 // Returns true on success, or false on failure.
44 virtual bool SetReceiveBufferSize(int32 size) = 0;
45
46 // Set the send buffer size (in bytes) for the socket.
47 // Note: changing this value can effect the TCP window size on some platforms.
48 // Returns true on success, or false on failure.
49 virtual bool SetSendBufferSize(int32 size) = 0;
40 }; 50 };
41 51
42 } // namespace net 52 } // namespace net
43 53
44 #endif // NET_SOCKET_SOCKET_H_ 54 #endif // NET_SOCKET_SOCKET_H_
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_base_unittest.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698