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

Unified Diff: net/http/http_stream_factory.h

Issue 1326503003: Added a net::BidirectionalStream to expose a bidirectional streaming interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass through priority and netlog Created 5 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
Index: net/http/http_stream_factory.h
diff --git a/net/http/http_stream_factory.h b/net/http/http_stream_factory.h
index 231271dffe70cef2ab1c119b64e20d82bf8e8782..b1919b815608397e44a7953675e5027f2a647083 100644
--- a/net/http/http_stream_factory.h
+++ b/net/http/http_stream_factory.h
@@ -15,6 +15,7 @@
#include "net/base/load_states.h"
#include "net/base/net_export.h"
#include "net/base/request_priority.h"
+#include "net/http/bidirectional_stream.h"
#include "net/http/http_server_properties.h"
#include "net/socket/connection_attempts.h"
#include "net/ssl/ssl_failure_state.h"
@@ -84,6 +85,10 @@ class NET_EXPORT_PRIVATE HttpStreamRequest {
const ProxyInfo& used_proxy_info,
WebSocketHandshakeStreamBase* stream) = 0;
+ virtual void OnBidirectionalStreamReady(const SSLConfig& used_ssl_config,
+ const ProxyInfo& used_proxy_info,
+ BidirectionalStream* stream) = 0;
+
// This is the failure to create a stream case.
// |used_ssl_config| indicates the actual SSL configuration used for this
// stream, since the HttpStreamRequest may have modified the configuration
@@ -222,6 +227,16 @@ class NET_EXPORT HttpStreamFactory {
WebSocketHandshakeStreamBase::CreateHelper* create_helper,
const BoundNetLog& net_log) = 0;
+ // Will call delegate->OnBidirectionalStreamReady on successful
+ // completion.
+ virtual HttpStreamRequest* RequestBidirectionalStream(
+ const HttpRequestInfo& info,
+ RequestPriority priority,
+ const SSLConfig& server_ssl_config,
+ const SSLConfig& proxy_ssl_config,
+ HttpStreamRequest::Delegate* delegate,
+ const BoundNetLog& net_log) = 0;
mmenke 2015/10/07 18:43:33 Unlike the two above methods, BidirectionalStreams
xunjieli 2015/10/19 21:07:46 Talked to Matt offline on this. I added a wrapper
+
// Requests that enough connections for |num_streams| be opened.
virtual void PreconnectStreams(int num_streams,
const HttpRequestInfo& info,

Powered by Google App Engine
This is Rietveld 408576698