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

Unified Diff: net/base/tcp_listen_socket.h

Issue 13812005: net: move socket files from net/base to net/socket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort gyp Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/stream_listen_socket.cc ('k') | net/base/tcp_listen_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/tcp_listen_socket.h
diff --git a/net/base/tcp_listen_socket.h b/net/base/tcp_listen_socket.h
deleted file mode 100644
index 7466e60b24cdbc3634fb3c2ad11c7fc07e585316..0000000000000000000000000000000000000000
--- a/net/base/tcp_listen_socket.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef NET_BASE_TCP_LISTEN_SOCKET_H_
-#define NET_BASE_TCP_LISTEN_SOCKET_H_
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "base/memory/ref_counted.h"
-#include "net/base/net_export.h"
-#include "net/base/stream_listen_socket.h"
-
-namespace net {
-
-// Implements a TCP socket. Note that this is ref counted.
-class NET_EXPORT TCPListenSocket : public StreamListenSocket {
- public:
- // Listen on port for the specified IP address. Use 127.0.0.1 to only
- // accept local connections.
- static scoped_refptr<TCPListenSocket> CreateAndListen(
- const std::string& ip, int port, StreamListenSocket::Delegate* del);
-
- // Get raw TCP socket descriptor bound to ip:port.
- static SocketDescriptor CreateAndBind(const std::string& ip, int port);
-
- // Get raw TCP socket descriptor bound to ip and return port it is bound to.
- static SocketDescriptor CreateAndBindAnyPort(const std::string& ip,
- int* port);
-
- protected:
- friend class scoped_refptr<TCPListenSocket>;
-
- TCPListenSocket(SocketDescriptor s, StreamListenSocket::Delegate* del);
- virtual ~TCPListenSocket();
-
- // Implements StreamListenSocket::Accept.
- virtual void Accept() OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TCPListenSocket);
-};
-
-// Factory that can be used to instantiate TCPListenSocket.
-class NET_EXPORT TCPListenSocketFactory : public StreamListenSocketFactory {
- public:
- TCPListenSocketFactory(const std::string& ip, int port);
- virtual ~TCPListenSocketFactory();
-
- // StreamListenSocketFactory overrides.
- virtual scoped_refptr<StreamListenSocket> CreateAndListen(
- StreamListenSocket::Delegate* delegate) const OVERRIDE;
-
- private:
- const std::string ip_;
- const int port_;
-
- DISALLOW_COPY_AND_ASSIGN(TCPListenSocketFactory);
-};
-
-} // namespace net
-
-#endif // NET_BASE_TCP_LISTEN_SOCKET_H_
« no previous file with comments | « net/base/stream_listen_socket.cc ('k') | net/base/tcp_listen_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698