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

Unified Diff: net/socket/ssl_client_socket_nss.h

Issue 255074: Make SSLClientSocketNSS full-duplex (Closed)
Patch Set: fix wtc comment Created 11 years, 2 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/socket/ssl_client_socket_nss.cc » ('j') | net/socket/ssl_client_socket_nss.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_nss.h
diff --git a/net/socket/ssl_client_socket_nss.h b/net/socket/ssl_client_socket_nss.h
index 8cbdff672ec0e742f9662df51d5038de15b4950f..1535e04f5689150a9f77762e6b8584ccd7e8ca86 100644
--- a/net/socket/ssl_client_socket_nss.h
+++ b/net/socket/ssl_client_socket_nss.h
@@ -57,17 +57,25 @@ class SSLClientSocketNSS : public SSLClientSocket {
private:
void InvalidateSessionIfBadCertificate();
X509Certificate* UpdateServerCert();
- void DoCallback(int result);
+ void DoReadCallback(int result);
+ void DoWriteCallback(int result);
void DoConnectCallback(int result);
- void OnIOComplete(int result);
+ void OnHandshakeIOComplete(int result);
+ void OnSendComplete(int result);
+ void OnRecvComplete(int result);
- int DoLoop(int last_io_result);
- int DoHandshakeRead();
+ int DoHandshakeLoop(int last_io_result);
+ int DoReadLoop(int result);
+ int DoWriteLoop(int result);
+
+ int DoHandshake();
int DoVerifyCert(int result);
int DoVerifyCertComplete(int result);
int DoPayloadRead();
int DoPayloadWrite();
int Init();
+
+ bool DoTransportIO();
int BufferSend(void);
int BufferRecv(void);
void BufferSendComplete(int result);
@@ -87,17 +95,22 @@ class SSLClientSocketNSS : public SSLClientSocket {
bool transport_recv_busy_;
scoped_refptr<IOBuffer> recv_buffer_;
- CompletionCallbackImpl<SSLClientSocketNSS> io_callback_;
+ CompletionCallbackImpl<SSLClientSocketNSS> handshake_io_callback_;
scoped_ptr<ClientSocket> transport_;
std::string hostname_;
SSLConfig ssl_config_;
CompletionCallback* user_connect_callback_;
- CompletionCallback* user_callback_;
+ CompletionCallback* user_read_callback_;
+ CompletionCallback* user_write_callback_;
+
+ // Used by Read function.
+ scoped_refptr<IOBuffer> user_read_buf_;
+ int user_read_buf_len_;
- // Used by both Read and Write functions.
- scoped_refptr<IOBuffer> user_buf_;
- int user_buf_len_;
+ // Used by Write function.
+ scoped_refptr<IOBuffer> user_write_buf_;
+ int user_write_buf_len_;
// Set when handshake finishes.
scoped_refptr<X509Certificate> server_cert_;
@@ -109,13 +122,11 @@ class SSLClientSocketNSS : public SSLClientSocket {
enum State {
STATE_NONE,
- STATE_HANDSHAKE_READ,
+ STATE_HANDSHAKE,
STATE_VERIFY_CERT,
STATE_VERIFY_CERT_COMPLETE,
- STATE_PAYLOAD_WRITE,
- STATE_PAYLOAD_READ,
};
- State next_state_;
+ State next_handshake_state_;
// The NSS SSL state machine
PRFileDesc* nss_fd_;
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_nss.cc » ('j') | net/socket/ssl_client_socket_nss.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698