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

Unified Diff: net/socket/tcp_socket.h

Issue 22861033: Move server socket functionality from TCPServerSocket into TCPSocket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
Index: net/socket/tcp_socket.h
diff --git a/net/socket/tcp_socket.h b/net/socket/tcp_socket.h
new file mode 100644
index 0000000000000000000000000000000000000000..986dbaae5ac6493b214fc90e50fa3398c5ce75a0
--- /dev/null
+++ b/net/socket/tcp_socket.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2013 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_SOCKET_TCP_SOCKET_H_
+#define NET_SOCKET_TCP_SOCKET_H_
+
+#include "build/build_config.h"
+
+#if defined(OS_WIN)
+#include "net/socket/tcp_socket_win.h"
+#elif defined(OS_POSIX)
+#include "net/socket/tcp_socket_libevent.h"
+#endif
+
+namespace net {
+
+// TCPSocket provides a platform-indenpendent interface for TCP sockets.
Wez 2013/08/30 19:17:51 typo: independent
yzshen1 2013/08/30 21:11:22 Done.
+//
+// It is recommended to use TCPClientSocket/TCPServerSocket instead of this
+// class, unless a clear separation of client and server socket functionality is
+// not suitable for your use case (e.g., a socket needs to be created and bound
+// before you know whether it is a client or server socket).
+#if defined(OS_WIN)
+typedef TCPSocketWin TCPSocket;
+#elif defined(OS_POSIX)
+typedef TCPSocketLibevent TCPSocket;
+#endif
+
+} // namespace net
+
+#endif // NET_SOCKET_TCP_SOCKET_H_

Powered by Google App Engine
This is Rietveld 408576698