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

Unified Diff: remoting/protocol/host_control_sender.h

Issue 7218061: Close all writers before JingleSession is destroyed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 9 years, 6 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 | « remoting/protocol/connection_to_host.cc ('k') | remoting/protocol/host_control_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/host_control_sender.h
diff --git a/remoting/protocol/host_control_sender.h b/remoting/protocol/host_control_sender.h
index 2cce5987f6864300a9d28cd4e803523686f01dfc..a0eea33c0da798ae8d13f591b72c615873ad7eb3 100644
--- a/remoting/protocol/host_control_sender.h
+++ b/remoting/protocol/host_control_sender.h
@@ -27,9 +27,11 @@ namespace protocol {
class BufferedSocketWriter;
+// Implementation of HostStub that sends commands on a socket. Must be
+// created and closed on the network thread, but can be used on any
+// other thread.
class HostControlSender : public HostStub {
public:
- // Create a stub using a socket.
explicit HostControlSender(net::Socket* socket);
virtual ~HostControlSender();
@@ -38,6 +40,10 @@ class HostControlSender : public HostStub {
virtual void BeginSessionRequest(
const LocalLoginCredentials* credentials, Task* done);
+ // Stop writing. Must be called on the network thread when the
+ // underlying socket is being destroyed.
+ void Close();
+
private:
// Buffered socket writer holds the serialized message and send it on the
// right thread.
« no previous file with comments | « remoting/protocol/connection_to_host.cc ('k') | remoting/protocol/host_control_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698