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

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

Issue 6930014: Rename ClientSocket to StreamSocket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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/deterministic_socket_data_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) 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_SERVER_SOCKET_H_ 5 #ifndef NET_SOCKET_SERVER_SOCKET_H_
6 #define NET_SOCKET_SERVER_SOCKET_H_ 6 #define NET_SOCKET_SERVER_SOCKET_H_
7 7
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "net/base/completion_callback.h" 9 #include "net/base/completion_callback.h"
10 10
11 namespace net { 11 namespace net {
12 12
13 class ClientSocket;
14 class IPEndPoint; 13 class IPEndPoint;
14 class StreamSocket;
15 15
16 class ServerSocket { 16 class ServerSocket {
17 public: 17 public:
18 ServerSocket() { } 18 ServerSocket() { }
19 virtual ~ServerSocket() { } 19 virtual ~ServerSocket() { }
20 20
21 // Bind the socket and start listening. Destroy the socket to stop 21 // Bind the socket and start listening. Destroy the socket to stop
22 // listening. 22 // listening.
23 virtual int Listen(const net::IPEndPoint& address, int backlog) = 0; 23 virtual int Listen(const net::IPEndPoint& address, int backlog) = 0;
24 24
25 // Gets current address the socket is bound to. 25 // Gets current address the socket is bound to.
26 virtual int GetLocalAddress(IPEndPoint* address) const = 0; 26 virtual int GetLocalAddress(IPEndPoint* address) const = 0;
27 27
28 // Accept connection. Callback is called when new connection is 28 // Accept connection. Callback is called when new connection is
29 // accepted. 29 // accepted.
30 virtual int Accept(scoped_ptr<ClientSocket>* socket, 30 virtual int Accept(scoped_ptr<StreamSocket>* socket,
31 CompletionCallback* callback) = 0; 31 CompletionCallback* callback) = 0;
32 32
33 private: 33 private:
34 DISALLOW_COPY_AND_ASSIGN(ServerSocket); 34 DISALLOW_COPY_AND_ASSIGN(ServerSocket);
35 }; 35 };
36 36
37 } // namespace net 37 } // namespace net
38 38
39 #endif // NET_SOCKET_TCP_SERVER_SOCKET_H_ 39 #endif // NET_SOCKET_TCP_SERVER_SOCKET_H_
OLDNEW
« no previous file with comments | « net/socket/deterministic_socket_data_unittest.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698