Commit b4f25c89 authored by zyearn's avatar zyearn Committed by gejun

Add flow control in http2

parent d6ebf1d2
This diff is collapsed.
......@@ -164,6 +164,7 @@ private:
class H2StreamContext : public HttpContext {
public:
H2StreamContext();
~H2StreamContext();
void Init(H2Context* conn_ctx, int stream_id);
H2StreamContext(H2Context* conn_ctx, int stream_id);
......@@ -198,6 +199,7 @@ friend class H2Context;
#endif
bool _stream_ended;
butil::atomic<int64_t> _remote_window_size;
butil::atomic<int64_t> _local_window_size;
uint64_t _correlation_id;
butil::IOBuf _remaining_header_fragment;
};
......
......@@ -762,6 +762,11 @@ private:
butil::Mutex _stream_mutex;
std::set<StreamId> *_stream_set;
// In some protocols, certain resources may run out according to
// protocol spec. For example, http2 streamId would run out after
// long time running and a new socket should be created. In order
// not to affect main socket, _agent_socket are introduced to
// represent the communication socket.
SocketUniquePtr _agent_socket;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment