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

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

Issue 6820057: Added TCPServerSocket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 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 | « net/socket/server_socket.h ('k') | net/socket/tcp_client_socket_win.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) 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_LIBEVENT_H_ 5 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_
6 #define NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 18 matching lines...) Expand all
29 // connection. 29 // connection.
30 TCPClientSocketLibevent(const AddressList& addresses, 30 TCPClientSocketLibevent(const AddressList& addresses,
31 net::NetLog* net_log, 31 net::NetLog* net_log,
32 const net::NetLog::Source& source); 32 const net::NetLog::Source& source);
33 33
34 virtual ~TCPClientSocketLibevent(); 34 virtual ~TCPClientSocketLibevent();
35 35
36 // AdoptSocket causes the given, connected socket to be adopted as a TCP 36 // AdoptSocket causes the given, connected socket to be adopted as a TCP
37 // socket. This object must not be connected. This object takes ownership of 37 // socket. This object must not be connected. This object takes ownership of
38 // the given socket and then acts as if Connect() had been called. This 38 // the given socket and then acts as if Connect() had been called. This
39 // function is intended for testing only. 39 // function is used by TCPServerSocket() to adopt accepted connections
40 // and for testing.
40 void AdoptSocket(int socket); 41 void AdoptSocket(int socket);
41 42
42 // ClientSocket methods: 43 // ClientSocket methods:
43 virtual int Connect(CompletionCallback* callback); 44 virtual int Connect(CompletionCallback* callback);
44 virtual void Disconnect(); 45 virtual void Disconnect();
45 virtual bool IsConnected() const; 46 virtual bool IsConnected() const;
46 virtual bool IsConnectedAndIdle() const; 47 virtual bool IsConnectedAndIdle() const;
47 virtual int GetPeerAddress(AddressList* address) const; 48 virtual int GetPeerAddress(AddressList* address) const;
48 virtual const BoundNetLog& NetLog() const; 49 virtual const BoundNetLog& NetLog() const;
49 virtual void SetSubresourceSpeculation(); 50 virtual void SetSubresourceSpeculation();
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 191
191 // True when TCP FastOpen is in use and we have done the connect. 192 // True when TCP FastOpen is in use and we have done the connect.
192 bool tcp_fastopen_connected_; 193 bool tcp_fastopen_connected_;
193 194
194 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketLibevent); 195 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketLibevent);
195 }; 196 };
196 197
197 } // namespace net 198 } // namespace net
198 199
199 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ 200 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_
OLDNEW
« no previous file with comments | « net/socket/server_socket.h ('k') | net/socket/tcp_client_socket_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698