Skip to content

Commit 9d175ef

Browse files
committed
quic: move HTTP/3 APIs back inside node:quic
1 parent ec1dc6e commit 9d175ef

46 files changed

Lines changed: 764 additions & 825 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎doc/api/http3.md‎

Lines changed: 0 additions & 731 deletions
This file was deleted.

‎doc/api/quic.md‎

Lines changed: 708 additions & 8 deletions
Large diffs are not rendered by default.

‎doc/type-map.json‎

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -159,19 +159,5 @@
159159
"ZipEntry": "zlib.html#class-zlibzipentry",
160160
"ZipFile": "zlib.html#class-zlibzipfile",
161161
"zlib options": "zlib.html#class-options",
162-
"zstd options": "zlib.html#class-zstdoptions",
163-
"Http3Session": "http3.html#class-http3session",
164-
"Http3Stream": "http3.html#class-http3stream",
165-
"Http3Settings": "http3.html#type-http3settings",
166-
"http3.OnSessionCallback": "http3.html#callback-onsessioncallback",
167-
"http3.OnStreamCallback": "http3.html#callback-onstreamcallback",
168-
"http3.OnGoawayCallback": "http3.html#callback-ongoawaycallback",
169-
"http3.OnOriginCallback": "http3.html#callback-onorigincallback",
170-
"http3.OnSettingsCallback": "http3.html#callback-onsettingscallback",
171-
"http3.OnHeadersCallback": "http3.html#callback-onheaderscallback",
172-
"http3.OnInfoCallback": "http3.html#callback-oninfocallback",
173-
"http3.OnTrailersCallback": "http3.html#callback-ontrailerscallback",
174-
"http3.OnWantTrailersCallback": "http3.html#callback-onwanttrailerscallback",
175-
"http3.OnResetCallback": "http3.html#callback-onresetcallback",
176-
"http3.OnErrorCallback": "http3.html#callback-onerrorcallback"
162+
"zstd options": "zlib.html#class-zstdoptions"
177163
}

‎lib/http3.js‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

‎lib/internal/bootstrap/realm.js‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ const legacyWrapperList = new SafeSet([
126126
const schemelessBlockList = new SafeSet([
127127
'dtls',
128128
'ffi',
129-
'http3',
130129
'sea',
131130
'sqlite',
132131
'quic',
@@ -138,7 +137,6 @@ const schemelessBlockList = new SafeSet([
138137
const experimentalModuleList = new SafeSet([
139138
'dtls',
140139
'ffi',
141-
'http3',
142140
'quic',
143141
'sqlite',
144142
'stream/iter',

‎lib/internal/modules/cjs/loader.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ function initializeCJS() {
497497
modules = modules.filter((i) => i !== 'node:dtls');
498498
}
499499
if (!getOptionValue('--experimental-quic')) {
500-
modules = modules.filter((i) => i !== 'node:quic' && i !== 'node:http3');
500+
modules = modules.filter((i) => i !== 'node:quic');
501501
}
502502
if (!getOptionValue('--experimental-ffi')) {
503503
modules = modules.filter((i) => i !== 'node:ffi');

‎lib/internal/process/pre_execution.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,6 @@ function setupQuic() {
438438

439439
const { BuiltinModule } = require('internal/bootstrap/realm');
440440
BuiltinModule.allowRequireByUsers('quic');
441-
BuiltinModule.allowRequireByUsers('http3');
442441
}
443442

444443
function setupVfs() {

‎lib/internal/quic/quic.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ const kNilDatagramId = 0n;
252252
// session. This is a private API for configuring native integrations, not a
253253
// public option: installing an application without its consumer layer on top
254254
// breaks the session, as applications integrate natively with their matching
255-
// consumer (e.g. node:http3).
255+
// consumer (e.g. the HTTP/3 layer in internal/quic/http3).
256256
const kApplication = Symbol('kApplication');
257257

258258
// Constructor option symbol carrying the application-specific settings for
@@ -262,7 +262,7 @@ const kApplication = Symbol('kApplication');
262262
const kApplicationSettings = Symbol('kApplicationSettings');
263263

264264
// Internal symbols to allow a protocol application's consumer layer (e.g.
265-
// node:http3) to reach the binding handles of a stream or session:
265+
// the HTTP/3 layer) to reach the binding handles of a stream or session:
266266
const kStreamHandle = Symbol('kStreamHandle');
267267
const kSessionHandle = Symbol('kSessionHandle');
268268
// Brands a C++ handle object with its application-layer owner (e.g. the
@@ -4676,7 +4676,7 @@ function processSessionOptions(options, config = kEmptyObject) {
46764676
} = config;
46774677

46784678
// The protocol application to install (internal-only; set by the
4679-
// application's consumer layer, e.g. node:http3). Bad values are core
4679+
// application's consumer layer, e.g. the HTTP/3 layer). Bad values are core
46804680
// bugs, not user errors, so this is an internal assert.
46814681
const application = options[kApplication];
46824682
assert(application === undefined || typeof application === 'string',
@@ -4908,7 +4908,7 @@ module.exports = {
49084908
DEFAULT_CIPHERS,
49094909
DEFAULT_GROUPS,
49104910
// Internal-only, protocol-neutral hooks for a protocol application's
4911-
// consumer layer (e.g. node:http3). Never exported from node:quic.
4911+
// consumer layer (e.g. the HTTP/3 layer). Never exported to users.
49124912
kApplication,
49134913
kApplicationSettings,
49144914
kStreamHandle,

‎lib/quic.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ const {
2020
DEFAULT_GROUPS,
2121
} = require('internal/quic/quic');
2222

23+
const {
24+
connect: connectHttp3,
25+
listen: listenHttp3,
26+
Http3Session,
27+
Http3Stream,
28+
} = require('internal/quic/http3');
29+
2330
const cc = {
2431
get RENO() { return CC_ALGO_RENO; },
2532
get CUBIC() { return CC_ALGO_CUBIC; },
@@ -35,7 +42,11 @@ const constants = {
3542
module.exports = {
3643
connect,
3744
listen,
45+
connectHttp3,
46+
listenHttp3,
3847
listEndpoints,
48+
Http3Session,
49+
Http3Stream,
3950
QuicEndpoint,
4051
QuicError,
4152
QuicSession,

‎src/node_builtins.cc‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ BuiltinLoader::BuiltinCategories BuiltinLoader::GetBuiltinCategories() const {
150150
#endif // !HAVE_FFI
151151
"dtls", // Experimental.
152152
"ffi", // Experimental.
153-
"http3", // Experimental.
154153
"quic", // Experimental.
155154
"sqlite", // Experimental.
156155
"stream/iter", // Experimental.

0 commit comments

Comments
 (0)