Lines Matching refs:Http2Stream
79 Http2Scope::Http2Scope(Http2Stream* stream) : Http2Scope(stream->session()) {}
531 // Ensure that all `Http2Stream` instances and the memory they hold
637 void Http2Stream::EmitStatistics() {
647 "Http2Stream",
735 BaseObjectPtr<Http2Stream> Http2Session::FindStream(int32_t id) {
737 return s != streams_.end() ? s->second : BaseObjectPtr<Http2Stream>();
749 has_available_session_memory(sizeof(Http2Stream));
752 void Http2Session::AddStream(Http2Stream* stream) {
754 streams_[stream->id()] = BaseObjectPtr<Http2Stream>(stream);
762 BaseObjectPtr<Http2Stream> Http2Session::RemoveStream(int32_t id) {
763 BaseObjectPtr<Http2Stream> stream;
895 BaseObjectPtr<Http2Stream> stream = session->FindStream(id);
900 Http2Stream::New(session, id, frame->headers.cat) ==
923 // the Http2Stream is guaranteed to already exist.
932 BaseObjectPtr<Http2Stream> stream = session->FindStream(id);
1026 BaseObjectPtr<Http2Stream> stream = FindStream(id);
1121 BaseObjectPtr<Http2Stream> stream = session->FindStream(id);
1183 BaseObjectPtr<Http2Stream> stream = session->FindStream(id);
1215 // If the stream owner (e.g. the JS Http2Stream) wants more data, just
1295 Http2Stream* stream = static_cast<Http2Stream*>(stream_);
1340 BaseObjectPtr<Http2Stream> stream = FindStream(id);
1416 BaseObjectPtr<Http2Stream> stream = FindStream(id);
1698 BaseObjectPtr<Http2Stream> stream = FindStream(stream_id);
1814 // given Http2Stream, when we set the `NGHTTP2_DATA_FLAG_NO_COPY` flag earlier
1815 // in the Http2Stream::Provider::Stream::OnRead callback.
1825 BaseObjectPtr<Http2Stream> stream = session->FindStream(frame->hd.stream_id);
1870 // Creates a new Http2Stream and submits a new http2 request.
1871 Http2Stream* Http2Session::SubmitRequest(
1878 Http2Stream* stream = nullptr;
1879 Http2Stream::Provider::Stream prov(options);
1889 stream = Http2Stream::New(this, *ret, NGHTTP2_HCAT_HEADERS, options);
1967 bool Http2Session::HasWritesOnSocketForStream(Http2Stream* stream) {
2012 Http2Stream* Http2Stream::New(Http2Session* session,
2023 return new Http2Stream(session, obj, id, category, options);
2026 Http2Stream::Http2Stream(Http2Session* session,
2066 Http2Stream::~Http2Stream() {
2070 void Http2Stream::MemoryInfo(MemoryTracker* tracker) const {
2075 std::string Http2Stream::diagnostic_name() const {
2084 // Notify the Http2Stream that a new block of HEADERS is being processed.
2085 void Http2Stream::StartHeaders(nghttp2_headers_category category) {
2095 nghttp2_stream* Http2Stream::operator*() const { return stream(); }
2097 nghttp2_stream* Http2Stream::stream() const {
2101 void Http2Stream::Close(int32_t code) {
2108 ShutdownWrap* Http2Stream::CreateShutdownWrap(Local<Object> object) {
2114 int Http2Stream::DoShutdown(ShutdownWrap* req_wrap) {
2129 // Destroy the Http2Stream and render it unusable. Actual resources for the
2132 void Http2Stream::Destroy() {
2144 BaseObjectPtr<Http2Stream> strong_ref = session_->RemoveStream(id_);
2177 // Initiates a response on the Http2Stream using data provided via the
2179 int Http2Stream::SubmitResponse(const Http2Headers& headers, int options) {
2189 Http2Stream::Provider::Stream prov(this, options);
2202 int Http2Stream::SubmitInfo(const Http2Headers& headers) {
2218 void Http2Stream::OnTrailers() {
2230 int Http2Stream::SubmitTrailers(const Http2Headers& headers) {
2239 Http2Stream::Provider::Stream prov(this, 0);
2257 int Http2Stream::SubmitPriority(const Http2Priority& priority,
2275 // Closes the Http2Stream by submitting an RST_STREAM frame to the connected
2277 void Http2Stream::SubmitRstStream(const uint32_t code) {
2311 void Http2Stream::FlushRstStream() {
2323 // Submit a push promise and create the associated Http2Stream if successful.
2324 Http2Stream* Http2Stream::SubmitPushPromise(const Http2Headers& headers,
2338 Http2Stream* stream = nullptr;
2340 stream = Http2Stream::New(
2349 int Http2Stream::ReadStart() {
2368 int Http2Stream::ReadStop() {
2377 // The Http2Stream class is a subclass of StreamBase. The DoWrite method
2387 int Http2Stream::DoWrite(WriteWrap* req_wrap,
2413 // Ads a header to the Http2Stream. Note that the header name and value are
2418 bool Http2Stream::AddHeader(nghttp2_rcbuf* name,
2447 Http2Stream::Provider::Provider(Http2Stream* stream, int options) {
2453 Http2Stream::Provider::Provider(int options) {
2458 Http2Stream::Provider::~Provider() {
2464 Http2Stream::Provider::Stream::Stream(int options)
2465 : Http2Stream::Provider(options) {
2466 provider_.read_callback = Http2Stream::Provider::Stream::OnRead;
2469 Http2Stream::Provider::Stream::Stream(Http2Stream* stream, int options)
2470 : Http2Stream::Provider(stream, options) {
2471 provider_.read_callback = Http2Stream::Provider::Stream::OnRead;
2474 ssize_t Http2Stream::Provider::Stream::OnRead(nghttp2_session* handle,
2483 BaseObjectPtr<Http2Stream> stream = session->FindStream(id);
2539 void Http2Stream::IncrementAvailableOutboundLength(size_t amount) {
2544 void Http2Stream::DecrementAvailableOutboundLength(size_t amount) {
2691 // or the Http2Stream object.
2703 Http2Stream* stream =
2730 // the last proc stream id is the most recently created Http2Stream.
2776 // Submits an RST_STREAM frame effectively closing the Http2Stream. Note that
2779 void Http2Stream::RstStream(const FunctionCallbackInfo<Value>& args) {
2782 Http2Stream* stream;
2789 // Initiates a response on the Http2Stream using the StreamBase API to provide
2791 void Http2Stream::Respond(const FunctionCallbackInfo<Value>& args) {
2793 Http2Stream* stream;
2807 // Submits informational headers on the Http2Stream
2808 void Http2Stream::Info(const FunctionCallbackInfo<Value>& args) {
2810 Http2Stream* stream;
2818 // Submits trailing headers on the Http2Stream
2819 void Http2Stream::Trailers(const FunctionCallbackInfo<Value>& args) {
2821 Http2Stream* stream;
2830 // Grab the numeric id of the Http2Stream
2831 void Http2Stream::GetID(const FunctionCallbackInfo<Value>& args) {
2832 Http2Stream* stream;
2837 // Destroy the Http2Stream, rendering it no longer usable
2838 void Http2Stream::Destroy(const FunctionCallbackInfo<Value>& args) {
2839 Http2Stream* stream;
2845 // Initiate a Push Promise and create the associated Http2Stream
2846 void Http2Stream::PushPromise(const FunctionCallbackInfo<Value>& args) {
2848 Http2Stream* parent;
2857 Http2Stream* stream =
2872 void Http2Stream::Priority(const FunctionCallbackInfo<Value>& args) {
2874 Http2Stream* stream;
2884 // information about the Http2Stream. This updates the values in that
2886 void Http2Stream::RefreshState(const FunctionCallbackInfo<Value>& args) {
2887 Http2Stream* stream;
3245 SetProtoMethod(isolate, stream, "id", Http2Stream::GetID);
3246 SetProtoMethod(isolate, stream, "destroy", Http2Stream::Destroy);
3247 SetProtoMethod(isolate, stream, "priority", Http2Stream::Priority);
3248 SetProtoMethod(isolate, stream, "pushPromise", Http2Stream::PushPromise);
3249 SetProtoMethod(isolate, stream, "info", Http2Stream::Info);
3250 SetProtoMethod(isolate, stream, "trailers", Http2Stream::Trailers);
3251 SetProtoMethod(isolate, stream, "respond", Http2Stream::Respond);
3252 SetProtoMethod(isolate, stream, "rstStream", Http2Stream::RstStream);
3253 SetProtoMethod(isolate, stream, "refreshState", Http2Stream::RefreshState);
3259 SetConstructorFunction(context, target, "Http2Stream", stream);