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

Unified Diff: net/base/tcp_client_socket.h

Issue 14068: Reverting 6911. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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/listen_socket.cc ('k') | net/base/tcp_client_socket_libevent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/tcp_client_socket.h
===================================================================
--- net/base/tcp_client_socket.h (revision 6915)
+++ net/base/tcp_client_socket.h (working copy)
@@ -14,7 +14,7 @@
struct event; // From libevent
#include <sys/socket.h> // for struct sockaddr
#define SOCKET int
-#include "base/message_loop.h"
+#include "base/message_pump_libevent.h"
#endif
#include "base/scoped_ptr.h"
@@ -26,7 +26,7 @@
// A client socket that uses TCP as the transport layer.
//
-// NOTE: The windows implementation supports half duplex only.
+// NOTE: The windows implementation supports half duplex only.
// Read and Write calls must not be in progress at the same time.
// The libevent implementation supports full duplex because that
// made it slightly easier to implement ssl.
@@ -34,7 +34,7 @@
#if defined(OS_WIN)
public base::ObjectWatcher::Delegate
#elif defined(OS_POSIX)
- public MessageLoopForIO::Watcher
+ public base::MessagePumpLibevent::Watcher
#endif
{
public:
@@ -52,7 +52,7 @@
virtual bool IsConnected() const;
// Socket methods:
- // Multiple outstanding requests are not supported.
+ // Multiple outstanding requests are not supported.
// Full duplex mode (reading and writing at the same time) is not supported
// on Windows (but is supported on Linux and Mac for ease of implementation
// of SSLClientSocket)
@@ -97,11 +97,10 @@
bool waiting_connect_;
// The socket's libevent wrapper
- MessageLoopForIO::FileDescriptorWatcher socket_watcher_;
+ scoped_ptr<event> event_;
// Called by MessagePumpLibevent when the socket is ready to do I/O
- void OnFileCanReadWithoutBlocking(int fd);
- void OnFileCanWriteWithoutBlocking(int fd);
+ void OnSocketReady(short flags);
// The buffer used by OnSocketReady to retry Read requests
char* buf_;
« no previous file with comments | « net/base/listen_socket.cc ('k') | net/base/tcp_client_socket_libevent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698