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

Unified Diff: remoting/protocol/client_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/buffered_socket_writer.cc ('k') | remoting/protocol/client_control_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/client_control_sender.h
diff --git a/remoting/protocol/client_control_sender.h b/remoting/protocol/client_control_sender.h
index 08b8f82e5e8a12c559164ae3ee144c42a693119a..763ae9a0204093eb93fb9474553b41bd3126da72 100644
--- a/remoting/protocol/client_control_sender.h
+++ b/remoting/protocol/client_control_sender.h
@@ -27,9 +27,11 @@ namespace protocol {
class BufferedSocketWriter;
+// Implementation of ClientStub that sends commands on a socket. Must
+// be created and closed on the network thread, but can be used on any
+// other thread.
class ClientControlSender : public ClientStub {
public:
- // Create a stub using a socket.
explicit ClientControlSender(net::Socket* socket);
virtual ~ClientControlSender();
@@ -38,6 +40,10 @@ class ClientControlSender : public ClientStub {
virtual void BeginSessionResponse(const LocalLoginStatus* msg,
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/buffered_socket_writer.cc ('k') | remoting/protocol/client_control_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698