Chromium Code Reviews| Index: webrtc/base/openssladapter.h |
| diff --git a/webrtc/base/openssladapter.h b/webrtc/base/openssladapter.h |
| index 554627f58fa7dfe66a10a2abf2256c874b05b4a0..a2f3d30c8818507f5e8981a36786b5ef2de25c27 100644 |
| --- a/webrtc/base/openssladapter.h |
| +++ b/webrtc/base/openssladapter.h |
| @@ -12,6 +12,7 @@ |
| #define WEBRTC_BASE_OPENSSLADAPTER_H__ |
| #include <string> |
| +#include "webrtc/base/buffer.h" |
| #include "webrtc/base/messagehandler.h" |
| #include "webrtc/base/messagequeue.h" |
| #include "webrtc/base/ssladapter.h" |
| @@ -65,6 +66,9 @@ private: |
| void Error(const char* context, int err, bool signal = true); |
| void Cleanup(); |
| + // Return value and arguments have the same meanings as for Send. |
| + int DoSslWrite(const void* pv, size_t cb); |
| + |
| void OnMessage(Message* msg) override; |
| static bool VerifyServerName(SSL* ssl, const char* host, |
| @@ -86,6 +90,11 @@ private: |
| // If true, socket will retain SSL configuration after Close. |
| bool restartable_; |
| + // Set to true if SSL_write fails with SSL_ERROR_WANT_WRITE, which means we |
| + // need to keep retrying with *the same exact data* until it succeeds. |
| + bool pending_write_ = false; |
| + Buffer pending_data_; |
|
pthatcher1
2017/06/02 04:58:21
Why do we need both? Can't the non-emptiness of p
Taylor Brandstetter
2017/06/02 06:49:14
Sure, done.
|
| + |
| SSL* ssl_; |
| SSL_CTX* ssl_ctx_; |
| std::string ssl_host_name_; |