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

Unified Diff: remoting/jingle_glue/ssl_socket_adapter.h

Issue 10543069: Fix SSLSocketAdapter to handle asynchronous writes appropriately. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
Index: remoting/jingle_glue/ssl_socket_adapter.h
diff --git a/remoting/jingle_glue/ssl_socket_adapter.h b/remoting/jingle_glue/ssl_socket_adapter.h
index 24b0e051c2a6683965aa8dfcbdc3c8355a170e39..042f38b407c2d9f6ccd60fe25dc28ee657d66fdd 100644
--- a/remoting/jingle_glue/ssl_socket_adapter.h
+++ b/remoting/jingle_glue/ssl_socket_adapter.h
@@ -116,6 +116,7 @@ class SSLSocketAdapter : public talk_base::SSLAdapter {
SSLSTATE_NONE,
SSLSTATE_WAIT,
SSLSTATE_CONNECTED,
+ SSLSTATE_ERROR,
};
enum IOState {
@@ -126,7 +127,9 @@ class SSLSocketAdapter : public talk_base::SSLAdapter {
void OnConnected(int result);
void OnRead(int result);
- void OnWrite(int result);
+ void OnWritten(int result);
+
+ void DoWrite();
virtual void OnConnectEvent(talk_base::AsyncSocket* socket) OVERRIDE;
@@ -142,10 +145,14 @@ class SSLSocketAdapter : public talk_base::SSLAdapter {
scoped_ptr<net::SSLClientSocket> ssl_socket_;
SSLState ssl_state_;
+
IOState read_state_;
+ scoped_refptr<net::IOBuffer> read_buffer_;
+ int read_buffer_size_;
+ int read_buffer_position_;
+
+ scoped_refptr<net::DrainableIOBuffer> write_buffer_;
IOState write_state_;
- scoped_refptr<net::IOBuffer> transport_buf_;
- int data_transferred_;
DISALLOW_COPY_AND_ASSIGN(SSLSocketAdapter);
};
« no previous file with comments | « no previous file | remoting/jingle_glue/ssl_socket_adapter.cc » ('j') | remoting/jingle_glue/ssl_socket_adapter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698