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

Unified Diff: net/base/tcp_listen_socket.h

Issue 10389007: Change TCPListenSocket::SendInternal to use a non-blocking implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | 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
===================================================================
--- net/base/tcp_listen_socket.h (revision 135347)
+++ net/base/tcp_listen_socket.h (working copy)
@@ -12,6 +12,8 @@
#define NET_BASE_TCP_LISTEN_SOCKET_H_
#pragma once
+#include <list>
+
#include "build/build_config.h"
#if defined(OS_WIN)
@@ -26,6 +28,10 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
+#include "base/timer.h"
+#include "net/base/backoff_entry.h"
+#include "net/base/io_buffer.h"
#include "net/base/listen_socket.h"
#include "net/base/net_export.h"
@@ -101,9 +107,18 @@
SOCKET socket_;
private:
+ void SendData();
+
bool reads_paused_;
bool has_pending_reads_;
+ std::list<scoped_refptr<DrainableIOBuffer> > send_buffers_;
+ int send_pending_size_;
+ bool send_error_;
+ net::BackoffEntry send_backoff_;
+ // Used to continue sending data asynchronously.
+ base::OneShotTimer<TCPListenSocket> send_timer_;
+
DISALLOW_COPY_AND_ASSIGN(TCPListenSocket);
};
« no previous file with comments | « no previous file | net/base/tcp_listen_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698