Add signalSyncPoint to the WebGraphicsContext3D command buffer impls.
[chromium-blink-merge.git] / net / socket / server_socket.h
bloba48ebecdbcb663ca45171a54f9b9fe4ca10f149d
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
3 // found in the LICENSE file.
5 #ifndef NET_SOCKET_SERVER_SOCKET_H_
6 #define NET_SOCKET_SERVER_SOCKET_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "net/base/completion_callback.h"
10 #include "net/base/net_export.h"
12 namespace net {
14 class IPEndPoint;
15 class StreamSocket;
17 class NET_EXPORT ServerSocket {
18 public:
19 ServerSocket() { }
20 virtual ~ServerSocket() { }
22 // Allows the socket to share the local address to which the socket will be
23 // bound with other processes. Should be called before Listen().
24 virtual void AllowAddressReuse() = 0;
26 // Bind the socket and start listening. Destroy the socket to stop
27 // listening.
28 virtual int Listen(const net::IPEndPoint& address, int backlog) = 0;
30 // Gets current address the socket is bound to.
31 virtual int GetLocalAddress(IPEndPoint* address) const = 0;
33 // Accept connection. Callback is called when new connection is
34 // accepted.
35 virtual int Accept(scoped_ptr<StreamSocket>* socket,
36 const CompletionCallback& callback) = 0;
38 private:
39 DISALLOW_COPY_AND_ASSIGN(ServerSocket);
42 } // namespace net
44 #endif // NET_SOCKET_SERVER_SOCKET_H_