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

Side by Side Diff: net/http/http_pipelined_connection.h

Issue 7289006: Basic HTTP pipelining support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_HTTP_HTTP_PIPELINED_CONNECTION_H_
6 #define NET_HTTP_HTTP_PIPELINED_CONNECTION_H_
7 #pragma once
8
9 #include "net/base/net_export.h"
10 #include "net/base/net_log.h"
11
12 namespace net {
13
14 class BoundNetLog;
15 class ClientSocketHandle;
16 class HttpPipelinedStream;
17 class ProxyInfo;
18 struct SSLConfig;
19
20 class NET_EXPORT_PRIVATE HttpPipelinedConnection {
21 public:
22 class Delegate {
23 public:
24 // Called when a pipeline has newly available capacity. This may be because
25 // the first request has been sent and the pipeline is now active. Or, it
26 // may be because a request successfully completed.
27 virtual void OnPipelineHasCapacity(HttpPipelinedConnection* pipeline) = 0;
28 };
29
30 class Factory {
31 public:
32 virtual ~Factory() {}
33
34 virtual HttpPipelinedConnection* CreateNewPipeline(
35 ClientSocketHandle* connection,
36 Delegate* delegate,
37 const SSLConfig& used_ssl_config,
38 const ProxyInfo& used_proxy_info,
39 const BoundNetLog& net_log,
40 bool was_npn_negotiated) = 0;
41 };
42
43 virtual ~HttpPipelinedConnection() {}
44
45 // Returns a new stream that uses this pipeline.
46 virtual HttpPipelinedStream* CreateNewStream() = 0;
47
48 // The number of streams currently associated with this pipeline.
49 virtual int depth() const = 0;
50
51 // True if this pipeline can accept new HTTP requests. False if a fatal error
52 // has occurred.
53 virtual bool usable() const = 0;
54
55 // True if this pipeline has bound one request and is ready for additional
56 // requests.
57 virtual bool active() const = 0;
58
59 // The SSLConfig used to establish this connection.
60 virtual const SSLConfig& used_ssl_config() const = 0;
61
62 // The ProxyInfo used to establish this connection.
63 virtual const ProxyInfo& used_proxy_info() const = 0;
64
65 // The source of this pipelined connection.
66 virtual const NetLog::Source& source() const = 0;
67
68 // True if this connection was NPN negotiated.
69 virtual bool was_npn_negotiated() const = 0;
70 };
71
72 } // namespace net
73
74 #endif // NET_HTTP_HTTP_PIPELINED_CONNECTION_H_
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_pipelined_connection_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698