MCPcopy Create free account
hub / github.com/nodejs/node / [kInit]

Method [kInit]

lib/internal/http2/core.js:2122–2137  ·  view source on GitHub ↗
(id, handle)

Source from the content-addressed store, hash-verified

2120 }
2121
2122 [kInit](id, handle) {
2123 const state = this[kState];
2124 state.flags |= STREAM_FLAGS_READY;
2125
2126 const session = this[kSession];
2127 session[kState].pendingStreams.delete(this);
2128 session[kState].streams.set(id, this);
2129
2130 this[kID] = id;
2131 this[async_id_symbol] = handle.getAsyncId();
2132 handle[kOwner] = this;
2133 this[kHandle] = handle;
2134 handle.onread = onStreamRead;
2135 this.uncork();
2136 this.emit('ready');
2137 }
2138
2139 [kInspect](depth, opts) {
2140 if (typeof depth === 'number' && depth < 0)

Callers

nothing calls this directly

Calls 5

getAsyncIdMethod · 0.80
uncorkMethod · 0.80
deleteMethod · 0.65
setMethod · 0.45
emitMethod · 0.45

Tested by

no test coverage detected