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

Side by Side Diff: trunk/src/net/udp/udp_socket_win.h

Issue 227083002: Revert 261966 "make SetReceiveBufferSize and SetSendBufferSize r..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
« no previous file with comments | « trunk/src/net/udp/udp_socket_libevent.cc ('k') | trunk/src/net/udp/udp_socket_win.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UDP_UDP_SOCKET_WIN_H_ 5 #ifndef NET_UDP_UDP_SOCKET_WIN_H_
6 #define NET_UDP_UDP_SOCKET_WIN_H_ 6 #define NET_UDP_UDP_SOCKET_WIN_H_
7 7
8 #include <winsock2.h> 8 #include <winsock2.h>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // |callback| is the user callback function to call on complete. 88 // |callback| is the user callback function to call on complete.
89 // Returns a net error code, or ERR_IO_PENDING if the IO is in progress. 89 // Returns a net error code, or ERR_IO_PENDING if the IO is in progress.
90 // If ERR_IO_PENDING is returned, the caller must keep |buf| and |address| 90 // If ERR_IO_PENDING is returned, the caller must keep |buf| and |address|
91 // alive until the callback is called. 91 // alive until the callback is called.
92 int SendTo(IOBuffer* buf, 92 int SendTo(IOBuffer* buf,
93 int buf_len, 93 int buf_len,
94 const IPEndPoint& address, 94 const IPEndPoint& address,
95 const CompletionCallback& callback); 95 const CompletionCallback& callback);
96 96
97 // Set the receive buffer size (in bytes) for the socket. 97 // Set the receive buffer size (in bytes) for the socket.
98 // Returns a net error code. 98 bool SetReceiveBufferSize(int32 size);
99 int SetReceiveBufferSize(int32 size);
100 99
101 // Set the send buffer size (in bytes) for the socket. 100 // Set the send buffer size (in bytes) for the socket.
102 // Returns a net error code. 101 bool SetSendBufferSize(int32 size);
103 int SetSendBufferSize(int32 size);
104 102
105 // Returns true if the socket is already connected or bound. 103 // Returns true if the socket is already connected or bound.
106 bool is_connected() const { return socket_ != INVALID_SOCKET; } 104 bool is_connected() const { return socket_ != INVALID_SOCKET; }
107 105
108 const BoundNetLog& NetLog() const { return net_log_; } 106 const BoundNetLog& NetLog() const { return net_log_; }
109 107
110 // Sets corresponding flags in |socket_options_| to allow the socket 108 // Sets corresponding flags in |socket_options_| to allow the socket
111 // to share the local address to which the socket will be bound with 109 // to share the local address to which the socket will be bound with
112 // other processes. Should be called before Bind(). 110 // other processes. Should be called before Bind().
113 void AllowAddressReuse(); 111 void AllowAddressReuse();
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 CompletionCallback write_callback_; 254 CompletionCallback write_callback_;
257 255
258 BoundNetLog net_log_; 256 BoundNetLog net_log_;
259 257
260 DISALLOW_COPY_AND_ASSIGN(UDPSocketWin); 258 DISALLOW_COPY_AND_ASSIGN(UDPSocketWin);
261 }; 259 };
262 260
263 } // namespace net 261 } // namespace net
264 262
265 #endif // NET_UDP_UDP_SOCKET_WIN_H_ 263 #endif // NET_UDP_UDP_SOCKET_WIN_H_
OLDNEW
« no previous file with comments | « trunk/src/net/udp/udp_socket_libevent.cc ('k') | trunk/src/net/udp/udp_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698