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

Side by Side Diff: net/socket/tcp_client_socket_win.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/tcp_client_socket_pool_unittest.cc ('k') | net/socket/tcp_client_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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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_WIN_H_ 5 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_
6 #define NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_
7 7
8 #include <ws2tcpip.h> 8 #include <ws2tcpip.h>
9 9
10 #include "base/object_watcher.h" 10 #include "base/object_watcher.h"
(...skipping 17 matching lines...) Expand all
28 virtual void Disconnect(); 28 virtual void Disconnect();
29 virtual bool IsConnected() const; 29 virtual bool IsConnected() const;
30 virtual bool IsConnectedAndIdle() const; 30 virtual bool IsConnectedAndIdle() const;
31 31
32 // Socket methods: 32 // Socket methods:
33 // Multiple outstanding requests are not supported. 33 // Multiple outstanding requests are not supported.
34 // Full duplex mode (reading and writing at the same time) is supported 34 // Full duplex mode (reading and writing at the same time) is supported
35 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); 35 virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback);
36 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); 36 virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback);
37 37
38 virtual bool SetReceiveBufferSize(int32 size);
39 virtual bool SetSendBufferSize(int32 size);
40
38 private: 41 private:
39 class Core; 42 class Core;
40 43
41 int CreateSocket(const struct addrinfo* ai); 44 int CreateSocket(const struct addrinfo* ai);
42 void DoReadCallback(int rv); 45 void DoReadCallback(int rv);
43 void DoWriteCallback(int rv); 46 void DoWriteCallback(int rv);
44 void DidCompleteConnect(); 47 void DidCompleteConnect();
45 void DidCompleteRead(); 48 void DidCompleteRead();
46 void DidCompleteWrite(); 49 void DidCompleteWrite();
47 50
(...skipping 20 matching lines...) Expand all
68 71
69 // External callback; called when write is complete. 72 // External callback; called when write is complete.
70 CompletionCallback* write_callback_; 73 CompletionCallback* write_callback_;
71 74
72 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketWin); 75 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketWin);
73 }; 76 };
74 77
75 } // namespace net 78 } // namespace net
76 79
77 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ 80 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket_pool_unittest.cc ('k') | net/socket/tcp_client_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698