@fails-components/webtransport 0.3.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +81 -40
- package/lib/dom.ts +7 -5
- package/lib/http2/browser/browser.js +168 -0
- package/lib/http2/browser/browserparser.js +248 -0
- package/lib/http2/flowcontroller.js +371 -0
- package/lib/http2/node/capsuleparser.js +291 -0
- package/lib/http2/node/client.js +239 -0
- package/lib/http2/node/index.js +2 -0
- package/lib/http2/node/server.js +499 -0
- package/lib/http2/node/websocketparser.js +829 -0
- package/lib/http2/parserbase.js +139 -0
- package/lib/http2/parserbasehttp2.js +128 -0
- package/lib/http2/session.js +225 -0
- package/lib/http2/stream.js +354 -0
- package/lib/http2/websocketcommon.js +1 -0
- package/lib/{index.js → index.browser.js} +6 -10
- package/lib/index.node.js +27 -0
- package/lib/server.js +252 -69
- package/lib/session.js +31 -68
- package/lib/stream.js +103 -179
- package/lib/types.ts +174 -87
- package/lib/utils.js +2 -1
- package/lib/webstreams.browser.js +6 -0
- package/lib/webstreams.js +7 -0
- package/lib/webtransport.browser.js +284 -0
- package/lib/webtransport.node.js +137 -0
- package/lib/{webtransport.js → webtransportbase.js} +47 -41
- package/old_test/test.js +31 -29
- package/old_test/testsuite.js +1 -1
- package/package.json +18 -17
- package/readme.md +94 -30
- package/test/bidirectional-streams.spec.js +51 -9
- package/test/datagrams.spec.js +8 -2
- package/test/fixtures/known-bytes.js +29 -0
- package/test/fixtures/read-stream.js +1 -1
- package/test/fixtures/reader-value.js +1 -1
- package/test/fixtures/server.js +24 -10
- package/test/fixtures/webtransport.browser.js +20 -2
- package/test/fixtures/webtransport.js +1 -1
- package/test/index.js +33 -6
- package/test/pw-no-https-errors.json +5 -0
- package/test/session.spec.js +71 -52
- package/test/unidirectional-streams.spec.js +20 -4
- package/CMakeLists.txt +0 -991
- package/LICENSE.chromium +0 -27
- package/LICENSE.envoy +0 -207
- package/build.js +0 -313
- package/dist/lib/client.d.ts +0 -78
- package/dist/lib/client.d.ts.map +0 -1
- package/dist/lib/dom.d.ts +0 -87
- package/dist/lib/dom.d.ts.map +0 -1
- package/dist/lib/error.d.ts +0 -8
- package/dist/lib/error.d.ts.map +0 -1
- package/dist/lib/event-loop.d.ts +0 -33
- package/dist/lib/event-loop.d.ts.map +0 -1
- package/dist/lib/index.d.ts +0 -79
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/native.d.ts +0 -2
- package/dist/lib/native.d.ts.map +0 -1
- package/dist/lib/server.d.ts +0 -92
- package/dist/lib/server.d.ts.map +0 -1
- package/dist/lib/session.d.ts +0 -298
- package/dist/lib/session.d.ts.map +0 -1
- package/dist/lib/stream.d.ts +0 -135
- package/dist/lib/stream.d.ts.map +0 -1
- package/dist/lib/transport.d.ts +0 -34
- package/dist/lib/transport.d.ts.map +0 -1
- package/dist/lib/types.d.ts +0 -212
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/utils.d.ts +0 -11
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/webtransport.d.ts +0 -47
- package/dist/lib/webtransport.d.ts.map +0 -1
- package/dist/test/bidirectional-streams.spec.d.ts +0 -5
- package/dist/test/bidirectional-streams.spec.d.ts.map +0 -1
- package/dist/test/datagrams.spec.d.ts +0 -5
- package/dist/test/datagrams.spec.d.ts.map +0 -1
- package/dist/test/event-loop.node.d.ts +0 -2
- package/dist/test/event-loop.node.d.ts.map +0 -1
- package/dist/test/fixtures/certificate.d.ts +0 -21
- package/dist/test/fixtures/certificate.d.ts.map +0 -1
- package/dist/test/fixtures/chai.d.ts +0 -2
- package/dist/test/fixtures/chai.d.ts.map +0 -1
- package/dist/test/fixtures/known-bytes.d.ts +0 -6
- package/dist/test/fixtures/known-bytes.d.ts.map +0 -1
- package/dist/test/fixtures/p-timeout.d.ts +0 -8
- package/dist/test/fixtures/p-timeout.d.ts.map +0 -1
- package/dist/test/fixtures/read-cert-hash.d.ts +0 -6
- package/dist/test/fixtures/read-cert-hash.d.ts.map +0 -1
- package/dist/test/fixtures/read-stream.d.ts +0 -19
- package/dist/test/fixtures/read-stream.d.ts.map +0 -1
- package/dist/test/fixtures/reader-value.d.ts +0 -22
- package/dist/test/fixtures/reader-value.d.ts.map +0 -1
- package/dist/test/fixtures/server.d.ts +0 -5
- package/dist/test/fixtures/server.d.ts.map +0 -1
- package/dist/test/fixtures/webtransport.browser.d.ts +0 -3
- package/dist/test/fixtures/webtransport.browser.d.ts.map +0 -1
- package/dist/test/fixtures/webtransport.d.ts +0 -3
- package/dist/test/fixtures/webtransport.d.ts.map +0 -1
- package/dist/test/fixtures/write-stream.d.ts +0 -10
- package/dist/test/fixtures/write-stream.d.ts.map +0 -1
- package/dist/test/index.d.ts +0 -2
- package/dist/test/index.d.ts.map +0 -1
- package/dist/test/session.spec.d.ts +0 -5
- package/dist/test/session.spec.d.ts.map +0 -1
- package/dist/test/unidirectional-streams.spec.d.ts +0 -2
- package/dist/test/unidirectional-streams.spec.d.ts.map +0 -1
- package/failslogolicensereadme.txt +0 -4
- package/lib/event-loop.js +0 -88
- package/lib/native.js +0 -28
- package/lib/transport.js +0 -82
- package/platform/icufix/fakedata.cpp +0 -8
- package/platform/quiche/quic/core/io/socket_win.inc +0 -3
- package/platform/quiche_platform_impl/quiche_bug_tracker_impl.h +0 -7
- package/platform/quiche_platform_impl/quiche_client_stats_impl.h +0 -7
- package/platform/quiche_platform_impl/quiche_command_line_flags_impl.h +0 -7
- package/platform/quiche_platform_impl/quiche_containers_impl.h +0 -7
- package/platform/quiche_platform_impl/quiche_event_loop_impl.h +0 -7
- package/platform/quiche_platform_impl/quiche_export_impl.h +0 -6
- package/platform/quiche_platform_impl/quiche_flag_utils_impl.h +0 -11
- package/platform/quiche_platform_impl/quiche_flags_impl.h +0 -8
- package/platform/quiche_platform_impl/quiche_iovec_impl.h +0 -10
- package/platform/quiche_platform_impl/quiche_logging_impl.h +0 -21
- package/platform/quiche_platform_impl/quiche_mem_slice_impl.h +0 -2
- package/platform/quiche_platform_impl/quiche_mutex_impl.h +0 -8
- package/platform/quiche_platform_impl/quiche_prefetch_impl.h +0 -11
- package/platform/quiche_platform_impl/quiche_reference_counted_impl.h +0 -16
- package/platform/quiche_platform_impl/quiche_server_stats_impl.h +0 -7
- package/platform/quiche_platform_impl/quiche_stack_trace_impl.h +0 -12
- package/platform/quiche_platform_impl/quiche_stream_buffer_allocator_impl.h +0 -8
- package/platform/quiche_platform_impl/quiche_testvalue_impl.h +0 -1
- package/platform/quiche_platform_impl/quiche_thread_local_impl.h +0 -6
- package/platform/quiche_platform_impl/quiche_time_utils_impl.h +0 -13
- package/platform/quiche_platform_impl/quiche_udp_socket_platform_impl.h +0 -39
- package/src/http3backendresponse.cc +0 -36
- package/src/http3backendresponse.h +0 -109
- package/src/http3client.cc +0 -1529
- package/src/http3client.h +0 -557
- package/src/http3clientsession.cc +0 -65
- package/src/http3clientsession.h +0 -60
- package/src/http3clientstream.cc +0 -52
- package/src/http3clientstream.h +0 -42
- package/src/http3dispatcher.cc +0 -62
- package/src/http3dispatcher.h +0 -57
- package/src/http3eventloop.cc +0 -1107
- package/src/http3eventloop.h +0 -316
- package/src/http3server.cc +0 -514
- package/src/http3server.h +0 -151
- package/src/http3serverbackend.cc +0 -105
- package/src/http3serverbackend.h +0 -98
- package/src/http3serversession.cc +0 -123
- package/src/http3serversession.h +0 -95
- package/src/http3serverstream.cc +0 -463
- package/src/http3serverstream.h +0 -114
- package/src/http3sessioncache.cc +0 -85
- package/src/http3sessioncache.h +0 -59
- package/src/http3wtsessionvisitor.cc +0 -46
- package/src/http3wtsessionvisitor.h +0 -397
- package/src/http3wtstreamvisitor.cc +0 -155
- package/src/http3wtstreamvisitor.h +0 -404
- package/test/event-loop.node.js +0 -24
- package/tsconfig.json +0 -39
package/dist/lib/dom.d.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { ReadableStream } from 'node:stream/web';
|
|
3
|
-
export interface WebTransportDatagramStats {
|
|
4
|
-
timestamp: number;
|
|
5
|
-
expiredOutgoing: bigint;
|
|
6
|
-
droppedIncoming: bigint;
|
|
7
|
-
lostOutgoing: bigint;
|
|
8
|
-
}
|
|
9
|
-
export interface WebTransportStats {
|
|
10
|
-
timestamp: number;
|
|
11
|
-
bytesSent: bigint;
|
|
12
|
-
packetsSent: bigint;
|
|
13
|
-
packetsLost: bigint;
|
|
14
|
-
numOutgoingStreamsCreated: number;
|
|
15
|
-
numIncomingStreamsCreated: number;
|
|
16
|
-
bytesReceived: bigint;
|
|
17
|
-
packetsReceived: bigint;
|
|
18
|
-
smoothedRtt: number;
|
|
19
|
-
rttVariation: number;
|
|
20
|
-
minRtt: number;
|
|
21
|
-
estimatedSendRate: bigint;
|
|
22
|
-
datagrams: WebTransportDatagramStats;
|
|
23
|
-
}
|
|
24
|
-
export interface WebTransportCloseInfo {
|
|
25
|
-
closeCode: number;
|
|
26
|
-
reason: string;
|
|
27
|
-
}
|
|
28
|
-
export interface WebTransportDatagramDuplexStream {
|
|
29
|
-
readable: ReadableStream<Uint8Array>;
|
|
30
|
-
writable: WritableStream<Uint8Array>;
|
|
31
|
-
}
|
|
32
|
-
export interface WebTransportSendStreamStats {
|
|
33
|
-
timestamp: number;
|
|
34
|
-
bytesWritten: bigint;
|
|
35
|
-
bytesSent: bigint;
|
|
36
|
-
bytesAcknowledged: bigint;
|
|
37
|
-
}
|
|
38
|
-
export interface WebTransportSendStream extends WritableStream<Uint8Array> {
|
|
39
|
-
getStats: () => Promise<WebTransportSendStreamStats>;
|
|
40
|
-
}
|
|
41
|
-
export interface WebTransportReceiveStreamStats {
|
|
42
|
-
timestamp: number;
|
|
43
|
-
bytesReceived: bigint;
|
|
44
|
-
bytesRead: bigint;
|
|
45
|
-
}
|
|
46
|
-
export interface WebTransportReceiveStream extends ReadableStream<Uint8Array> {
|
|
47
|
-
getStats: () => Promise<WebTransportReceiveStreamStats>;
|
|
48
|
-
}
|
|
49
|
-
export interface WebTransportBidirectionalStream {
|
|
50
|
-
readonly readable: WebTransportReceiveStream;
|
|
51
|
-
readonly writable: WebTransportSendStream;
|
|
52
|
-
}
|
|
53
|
-
export interface WebTransportHash {
|
|
54
|
-
algorithm: string;
|
|
55
|
-
value: BufferSource;
|
|
56
|
-
}
|
|
57
|
-
export interface WebTransportOptions {
|
|
58
|
-
allowPooling?: boolean;
|
|
59
|
-
requireUnreliable?: boolean;
|
|
60
|
-
serverCertificateHashes?: WebTransportHash[];
|
|
61
|
-
/**
|
|
62
|
-
* Nonstandard option - when a new connection is opened, how long to wait for the quic handshake to complete in ms before rejecting
|
|
63
|
-
*/
|
|
64
|
-
quicConnectTimeout?: number;
|
|
65
|
-
/**
|
|
66
|
-
* Nonstandard option - when a new connection is opened, how long to wait for the webtransport handshake to complete in ms before rejecting
|
|
67
|
-
*/
|
|
68
|
-
webTransportConnectTimeout?: number;
|
|
69
|
-
congestionControl?: WebTransportCongestionControl;
|
|
70
|
-
}
|
|
71
|
-
export interface WebTransport {
|
|
72
|
-
getStats: () => Promise<WebTransportStats>;
|
|
73
|
-
readonly ready: Promise<void>;
|
|
74
|
-
readonly reliability: WebTransportReliabilityMode;
|
|
75
|
-
readonly congestionControl: WebTransportCongestionControl;
|
|
76
|
-
readonly closed: Promise<WebTransportCloseInfo>;
|
|
77
|
-
readonly draining: Promise<undefined>;
|
|
78
|
-
close: (closeInfo?: WebTransportCloseInfo) => void;
|
|
79
|
-
readonly datagrams: WebTransportDatagramDuplexStream;
|
|
80
|
-
createBidirectionalStream: () => Promise<WebTransportBidirectionalStream>;
|
|
81
|
-
readonly incomingBidirectionalStreams: ReadableStream<WebTransportBidirectionalStream>;
|
|
82
|
-
createUnidirectionalStream: () => Promise<WebTransportSendStream>;
|
|
83
|
-
readonly incomingUnidirectionalStreams: ReadableStream<WebTransportReceiveStream>;
|
|
84
|
-
}
|
|
85
|
-
export declare type WebTransportReliabilityMode = 'pending' | 'reliable-only' | 'supports-unreliable';
|
|
86
|
-
export declare type WebTransportCongestionControl = 'default' | 'throughput' | 'low-latency';
|
|
87
|
-
//# sourceMappingURL=dom.d.ts.map
|
package/dist/lib/dom.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../lib/dom.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAKrD,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;IACvB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,yBAAyB,EAAE,MAAM,CAAA;IACjC,yBAAyB,EAAE,MAAM,CAAA;IACjC,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,iBAAiB,EAAE,MAAM,CAAA;IACzB,SAAS,EAAE,yBAAyB,CAAA;CACrC;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;IACpC,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;CAMrC;AAGD,MAAM,WAAY,2BAA2B;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,iBAAiB,EAAE,MAAM,CAAA;C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O,CAAC,SAAS,CAAC,CAAA;IACrC,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAA;IAClD,QAAQ,CAAC,SAAS,EAAE,gCAAgC,CAAA;IAEpD,yBAAyB,EAAE,MAAM,OAAO,CAAC,+BAA+B,CAAC,CAAA;IAEzE,QAAQ,CAAC,4BAA4B,EAAE,cAAc,CAAC,+BAA+B,CAAC,CAAA;IAEtF,0BAA0B,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAEjE,QAAQ,CAAC,6BAA6B,EAAE,cAAc,CAAC,yBAAyB,CAAC,CAAA;CAClF;AAED,oBAAY,2BAA2B,GAAG,SAAS,GAAG,eAAe,GAAG,qBAAqB,CAAA;AAC7F,oBAAY,6BAA6B,GAAG,SAAS,GAAG,YAAY,GAAG,aAAa,CAAC"}
|
package/dist/lib/error.d.ts
DELETED
package/dist/lib/error.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../lib/error.js"],"names":[],"mappings":"AAAA;IACE;;OAEG;IACH,qBAFW,MAAM,EAMhB;IADa,6BAA8C;CAE7D"}
|
package/dist/lib/event-loop.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export class Http3EventLoop {
|
|
2
|
-
/** @type {Http3EventLoop | null} */
|
|
3
|
-
static globalLoop: Http3EventLoop | null;
|
|
4
|
-
static callback(): void;
|
|
5
|
-
/**
|
|
6
|
-
* @param {any} [args]
|
|
7
|
-
* @returns {Http3EventLoop}
|
|
8
|
-
*/
|
|
9
|
-
static createGlobalEventLoop(args?: any): Http3EventLoop;
|
|
10
|
-
/**
|
|
11
|
-
* @param {any} object
|
|
12
|
-
* @param {any} args
|
|
13
|
-
* @returns {Http3EventLoop}
|
|
14
|
-
*/
|
|
15
|
-
static getGlobalEventLoop(object: any, args: any): Http3EventLoop;
|
|
16
|
-
/**
|
|
17
|
-
* @param {{ quicheLogVerbose: any; } | undefined} [args]
|
|
18
|
-
*/
|
|
19
|
-
constructor(args?: {
|
|
20
|
-
quicheLogVerbose: any;
|
|
21
|
-
} | undefined);
|
|
22
|
-
eventloopInt: any;
|
|
23
|
-
refObjects: Set<any>;
|
|
24
|
-
loopGuardian(): void;
|
|
25
|
-
/**
|
|
26
|
-
* @param {*} [args]
|
|
27
|
-
*/
|
|
28
|
-
startEventLoop(args?: any): void;
|
|
29
|
-
loopGuardianTimer: NodeJS.Timer | undefined;
|
|
30
|
-
shutdownEventLoop(): void;
|
|
31
|
-
refObjectsEmptyTime: number | undefined;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=event-loop.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-loop.d.ts","sourceRoot":"","sources":["../../lib/event-loop.js"],"names":[],"mappings":"AAQA;IACE,oCAAoC;IACpC,mBADW,cAAc,GAAG,IAAI,CACR;IAgDxB,wBAEC;IAED;;;OAGG;IACH,oCAHW,GAAG,GACD,cAAc,CAS1B;IAED;;;;OAIG;IACH,kCAJW,GAAG,QACH,GAAG,GACD,cAAc,CAQ1B;IA1ED;;OAEG;IACH,mBAFW;QAAE,gBAAgB,EAAE,GAAG,CAAC;KAAE,GAAG,SAAS,EAchD;IAXC,kBAME;IAGF,qBAA2B;IAoB7B,qBAWC;IA3BD;;OAEG;IACH,iCAIC;IADC,4CAA6D;IAG/D,0BAKC;IASkC,wCAA8B;CAmClE"}
|
package/dist/lib/index.d.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* // Spec
|
|
3
|
-
* @typedef {import('./dom').WebTransportDatagramStats} WebTransportDatagramStats
|
|
4
|
-
* @typedef {import('./dom').WebTransportStats} WebTransportStats
|
|
5
|
-
* @typedef {import('./dom').WebTransportCloseInfo} WebTransportCloseInfo
|
|
6
|
-
* @typedef {import('./dom').WebTransportDatagramDuplexStream} WebTransportDatagramDuplexStream
|
|
7
|
-
* @typedef {import('./dom').WebTransportBidirectionalStream} WebTransportBidirectionalStream
|
|
8
|
-
* @typedef {import('./dom').WebTransportSendStreamStats} WebTransportSendStreamStats
|
|
9
|
-
* @typedef {import('./dom').WebTransportSendStream} WebTransportSendStream
|
|
10
|
-
* @typedef {import('./dom').WebTransportReceiveStreamStats} WebTransportReceiveStreamStats
|
|
11
|
-
* @typedef {import('./dom').WebTransportReceiveStream} WebTransportReceiveStream
|
|
12
|
-
* @typedef {import('./dom').WebTransportHash} WebTransportHash
|
|
13
|
-
* @typedef {import('./dom').WebTransportOptions} WebTransportOptions
|
|
14
|
-
* @typedef {import('./dom').WebTransportReliabilityMode} WebTransportReliabilityMode
|
|
15
|
-
*
|
|
16
|
-
* Public API
|
|
17
|
-
* @typedef {import('./types').WebTransportSession} WebTransportSession
|
|
18
|
-
* @typedef {import('./types').Http3ServerInit} Http3ServerInit
|
|
19
|
-
*/
|
|
20
|
-
export function testcheck(): boolean;
|
|
21
|
-
export { Http3Server } from "./server.js";
|
|
22
|
-
export { WebTransport } from "./webtransport.js";
|
|
23
|
-
/**
|
|
24
|
-
* // Spec
|
|
25
|
-
*/
|
|
26
|
-
export type WebTransportDatagramStats = import('./dom').WebTransportDatagramStats;
|
|
27
|
-
/**
|
|
28
|
-
* // Spec
|
|
29
|
-
*/
|
|
30
|
-
export type WebTransportStats = import('./dom').WebTransportStats;
|
|
31
|
-
/**
|
|
32
|
-
* // Spec
|
|
33
|
-
*/
|
|
34
|
-
export type WebTransportCloseInfo = import('./dom').WebTransportCloseInfo;
|
|
35
|
-
/**
|
|
36
|
-
* // Spec
|
|
37
|
-
*/
|
|
38
|
-
export type WebTransportDatagramDuplexStream = import('./dom').WebTransportDatagramDuplexStream;
|
|
39
|
-
/**
|
|
40
|
-
* // Spec
|
|
41
|
-
*/
|
|
42
|
-
export type WebTransportBidirectionalStream = import('./dom').WebTransportBidirectionalStream;
|
|
43
|
-
/**
|
|
44
|
-
* // Spec
|
|
45
|
-
*/
|
|
46
|
-
export type WebTransportSendStreamStats = import('./dom').WebTransportSendStreamStats;
|
|
47
|
-
/**
|
|
48
|
-
* // Spec
|
|
49
|
-
*/
|
|
50
|
-
export type WebTransportSendStream = import('./dom').WebTransportSendStream;
|
|
51
|
-
/**
|
|
52
|
-
* // Spec
|
|
53
|
-
*/
|
|
54
|
-
export type WebTransportReceiveStreamStats = import('./dom').WebTransportReceiveStreamStats;
|
|
55
|
-
/**
|
|
56
|
-
* // Spec
|
|
57
|
-
*/
|
|
58
|
-
export type WebTransportReceiveStream = import('./dom').WebTransportReceiveStream;
|
|
59
|
-
/**
|
|
60
|
-
* // Spec
|
|
61
|
-
*/
|
|
62
|
-
export type WebTransportHash = import('./dom').WebTransportHash;
|
|
63
|
-
/**
|
|
64
|
-
* // Spec
|
|
65
|
-
*/
|
|
66
|
-
export type WebTransportOptions = import('./dom').WebTransportOptions;
|
|
67
|
-
/**
|
|
68
|
-
* Public API
|
|
69
|
-
*/
|
|
70
|
-
export type WebTransportReliabilityMode = import('./dom').WebTransportReliabilityMode;
|
|
71
|
-
/**
|
|
72
|
-
* // Spec
|
|
73
|
-
*/
|
|
74
|
-
export type WebTransportSession = import('./types').WebTransportSession;
|
|
75
|
-
/**
|
|
76
|
-
* // Spec
|
|
77
|
-
*/
|
|
78
|
-
export type Http3ServerInit = import('./types').Http3ServerInit;
|
|
79
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/lib/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,qCAEC;;;;;;wCApBY,OAAO,OAAO,EAAE,yBAAyB;;;;gCACzC,OAAO,OAAO,EAAE,iBAAiB;;;;oCACjC,OAAO,OAAO,EAAE,qBAAqB;;;;+CACrC,OAAO,OAAO,EAAE,gCAAgC;;;;8CAChD,OAAO,OAAO,EAAE,+BAA+B;;;;0CAC/C,OAAO,OAAO,EAAE,2BAA2B;;;;qCAC3C,OAAO,OAAO,EAAE,sBAAsB;;;;6CACtC,OAAO,OAAO,EAAE,8BAA8B;;;;wCAC9C,OAAO,OAAO,EAAE,yBAAyB;;;;+BACzC,OAAO,OAAO,EAAE,gBAAgB;;;;kCAChC,OAAO,OAAO,EAAE,mBAAmB;;;;0CACnC,OAAO,OAAO,EAAE,2BAA2B;;;;kCAG3C,OAAO,SAAS,EAAE,mBAAmB;;;;8BACrC,OAAO,SAAS,EAAE,eAAe"}
|
package/dist/lib/native.d.ts
DELETED
package/dist/lib/native.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../lib/native.js"],"names":[],"mappings":"AA2BA,2BAAuC"}
|
package/dist/lib/server.d.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/**
|
|
3
|
-
* @typedef {import('./types').WebTransportSession} WebTransportSession
|
|
4
|
-
* @typedef {import('./types').NativeHttp3WTSession} NativeHttp3WTSession
|
|
5
|
-
* @typedef {import('./types').Http3ServerEventHandler} Http3ServerEventHandler
|
|
6
|
-
* @typedef {import('./types').Http3WTServerSessionVisitorEvent} Http3WTServerSessionVisitorEvent
|
|
7
|
-
* @typedef {import('./types').ServerStatusEvent} ServerStatusEvent
|
|
8
|
-
* @typedef {import('./types').ServerSessionRequestEvent} ServerSessionRequestEvent
|
|
9
|
-
* @typedef {import('./types').Http3ServerInit} Http3ServerInit
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* @implements {Http3ServerEventHandler}
|
|
13
|
-
*/
|
|
14
|
-
export class Http3Server extends Http3WebTransport implements Http3ServerEventHandler {
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* @param {Http3ServerInit} args
|
|
18
|
-
*/
|
|
19
|
-
constructor(args: Http3ServerInit);
|
|
20
|
-
/** @type {Record<string, ReadableStream>} */
|
|
21
|
-
sessionStreams: Record<string, ReadableStream>;
|
|
22
|
-
/** @type {Record<string, ReadableStreamDefaultController<Http3WTSession>>} */
|
|
23
|
-
sessionController: Record<string, ReadableStreamDefaultController<Http3WTSession>>;
|
|
24
|
-
port: number | null;
|
|
25
|
-
host: string | null;
|
|
26
|
-
/** @type {any} */
|
|
27
|
-
requestHandler: any;
|
|
28
|
-
_ready: import("./types").Deferred<unknown>;
|
|
29
|
-
ready: Promise<unknown>;
|
|
30
|
-
_closed: import("./types").Deferred<unknown>;
|
|
31
|
-
closed: Promise<unknown>;
|
|
32
|
-
startServer(): void;
|
|
33
|
-
stopServer(): void;
|
|
34
|
-
stopped: boolean | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* @returns {{ port: number, host: string, family: 'IPv4' | 'IPv6' } | null}
|
|
37
|
-
*/
|
|
38
|
-
address(): {
|
|
39
|
-
port: number;
|
|
40
|
-
host: string;
|
|
41
|
-
family: 'IPv4' | 'IPv6';
|
|
42
|
-
} | null;
|
|
43
|
-
/**
|
|
44
|
-
* @param {any} callback
|
|
45
|
-
*/
|
|
46
|
-
setRequestCallback(callback: any): void;
|
|
47
|
-
/**
|
|
48
|
-
* @param {string} path
|
|
49
|
-
* @param {object} [args]
|
|
50
|
-
* @param {boolean} [args.noAutoPaths]
|
|
51
|
-
* @returns {ReadableStream<WebTransportSession>}
|
|
52
|
-
*/
|
|
53
|
-
sessionStream(path: string, args?: {
|
|
54
|
-
noAutoPaths?: boolean | undefined;
|
|
55
|
-
} | undefined): ReadableStream<WebTransportSession>;
|
|
56
|
-
/**
|
|
57
|
-
* @param {ServerSessionRequestEvent} args
|
|
58
|
-
*/
|
|
59
|
-
onSessionRequest(args: ServerSessionRequestEvent): void;
|
|
60
|
-
/**
|
|
61
|
-
* @param {Http3WTServerSessionVisitorEvent} args
|
|
62
|
-
*/
|
|
63
|
-
onHttp3WTSessionVisitor(args: Http3WTServerSessionVisitorEvent): void;
|
|
64
|
-
/**
|
|
65
|
-
*/
|
|
66
|
-
onServerError(): void;
|
|
67
|
-
/**
|
|
68
|
-
*/
|
|
69
|
-
onServerListening(): void;
|
|
70
|
-
/**
|
|
71
|
-
*/
|
|
72
|
-
onServerClose(): void;
|
|
73
|
-
/**
|
|
74
|
-
* @param {ServerStatusEvent} evt
|
|
75
|
-
*/
|
|
76
|
-
onServerStatus(evt: ServerStatusEvent): void;
|
|
77
|
-
/**
|
|
78
|
-
* @param {Http3WTServerSessionVisitorEvent | ServerStatusEvent | ServerSessionRequestEvent} args
|
|
79
|
-
*/
|
|
80
|
-
customCallback(args: Http3WTServerSessionVisitorEvent | ServerStatusEvent | ServerSessionRequestEvent): void;
|
|
81
|
-
}
|
|
82
|
-
export type WebTransportSession = import('./types').WebTransportSession;
|
|
83
|
-
export type NativeHttp3WTSession = import('./types').NativeHttp3WTSession;
|
|
84
|
-
export type Http3ServerEventHandler = import('./types').Http3ServerEventHandler;
|
|
85
|
-
export type Http3WTServerSessionVisitorEvent = import('./types').Http3WTServerSessionVisitorEvent;
|
|
86
|
-
export type ServerStatusEvent = import('./types').ServerStatusEvent;
|
|
87
|
-
export type ServerSessionRequestEvent = import('./types').ServerSessionRequestEvent;
|
|
88
|
-
export type Http3ServerInit = import('./types').Http3ServerInit;
|
|
89
|
-
import { Http3WebTransport } from "./transport.js";
|
|
90
|
-
import { ReadableStream } from "stream/web";
|
|
91
|
-
import { Http3WTSession } from "./session.js";
|
|
92
|
-
//# sourceMappingURL=server.d.ts.map
|
package/dist/lib/server.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../lib/server.js"],"names":[],"mappings":";AAQA;;;;;;;;GAQG;AAEH;;GAEG;AACH;IACE;;;OAGG;IACH,kBAFW,eAAe,EAuBzB;IAlBC,6CAA6C;IAC7C,gBADW,OAAO,MAAM,EAAE,cAAc,CAAC,CACjB;IAExB,8EAA8E;IAC9E,mBADW,OAAO,MAAM,EAAE,gCAAgC,cAAc,CAAC,CAAC,CAC/C;IAE3B,oBAAgB;IAChB,oBAAgB;IAGhB,kBAAkB;IAClB,gBADW,GAAG,CACY;IAE1B,4CAAqB;IACrB,wBAAgC;IAEhC,6CAAsB;IACtB,yBAAkC;IAGpC,oBAGC;IAED,mBAOC;IADC,6BAAmB;IAGrB;;OAEG;IACH,WAFa;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI,CAa1E;IAED;;OAEG;IACH,6BAFW,GAAG,QAMb;IAED;;;;;OAKG;IACH,oBALW,MAAM;;oBAGJ,eAAe,mBAAmB,CAAC,CAe/C;IAED;;OAEG;IACH,uBAFW,yBAAyB,QAmBnC;IAED;;OAEG;IACH,8BAFW,gCAAgC,QAa1C;IAED;OACG;IACH,sBAEC;IAED;OACG;IACH,0BAEC;IAED;OACG;IACH,sBAEC;IAED;;OAEG;IACH,oBAFW,iBAAiB,QAoB3B;IAED;;OAEG;IACH,qBAFW,gCAAgC,GAAG,iBAAiB,GAAG,yBAAyB,QAqB1F;CACF;kCA1MY,OAAO,SAAS,EAAE,mBAAmB;mCACrC,OAAO,SAAS,EAAE,oBAAoB;sCACtC,OAAO,SAAS,EAAE,uBAAuB;+CACzC,OAAO,SAAS,EAAE,gCAAgC;gCAClD,OAAO,SAAS,EAAE,iBAAiB;wCACnC,OAAO,SAAS,EAAE,yBAAyB;8BAC3C,OAAO,SAAS,EAAE,eAAe"}
|
package/dist/lib/session.d.ts
DELETED
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/**
|
|
3
|
-
* WebTransport session events
|
|
4
|
-
* @typedef {import('./types').WebTransportSessionEventHandler} WebTransportSessionEventHandler
|
|
5
|
-
* @typedef {import('./types').SessionReadyEvent} SessionReadyEvent
|
|
6
|
-
* @typedef {import('./types').SessionCloseEvent} SessionCloseEvent
|
|
7
|
-
* @typedef {import('./types').DatagramReceivedEvent} DatagramReceivedEvent
|
|
8
|
-
* @typedef {import('./types').DatagramSendEvent} DatagramSendEvent
|
|
9
|
-
* @typedef {import('./types').GoawayReceivedEvent} GoawayReceivedEvent
|
|
10
|
-
* @typedef {import('./types').DatagramStatsEvent} DatagramStatsEvent
|
|
11
|
-
* @typedef {import('./types').SessionStatsEvent} SessionStatsEvent
|
|
12
|
-
* @typedef {import('./types').NewStreamEvent} NewStreamEvent
|
|
13
|
-
*
|
|
14
|
-
* @typedef {import('./dom').WebTransportCloseInfo} WebTransportCloseInfo
|
|
15
|
-
* @typedef {import('./dom').WebTransportBidirectionalStream} WebTransportBidirectionalStream
|
|
16
|
-
* @typedef {import('./dom').WebTransportSendStream} WebTransportSendStream
|
|
17
|
-
* @typedef {import('./dom').WebTransportReceiveStream} WebTransportReceiveStream
|
|
18
|
-
* @typedef {import('./dom').WebTransportDatagramDuplexStream} WebTransportDatagramDuplexStream
|
|
19
|
-
* @typedef {import('./dom').WebTransportReliabilityMode} WebTransportReliabilityMode
|
|
20
|
-
* @typedef {import('./dom').WebTransportCongestionControl} WebTransportCongestionControl
|
|
21
|
-
* @typedef {import('./dom').WebTransportStats} WebTransportStats
|
|
22
|
-
* @typedef {import('./dom').WebTransportDatagramStats} WebTransportDatagramStats
|
|
23
|
-
*
|
|
24
|
-
* @typedef {import('./types').NativeHttp3WTSession} NativeHttp3WTSession
|
|
25
|
-
*
|
|
26
|
-
* Public API
|
|
27
|
-
* @typedef {import('./types').WebTransportSession} WebTransportSession
|
|
28
|
-
*
|
|
29
|
-
* @typedef {import('./server').Http3Server} Http3Server
|
|
30
|
-
* @typedef {import('./client').Http3Client} Http3Client
|
|
31
|
-
*
|
|
32
|
-
* @typedef {import('stream/web').WritableStreamDefaultController} WritableStreamDefaultController
|
|
33
|
-
*/
|
|
34
|
-
/**
|
|
35
|
-
* @implements {WebTransportSessionEventHandler}
|
|
36
|
-
* @implements {WebTransportSession}
|
|
37
|
-
*/
|
|
38
|
-
export class Http3WTSession implements WebTransportSessionEventHandler, WebTransportSession {
|
|
39
|
-
/**
|
|
40
|
-
* @param {SessionReadyEvent | SessionCloseEvent | DatagramReceivedEvent | DatagramSendEvent | GoawayReceivedEvent | SessionStatsEvent | DatagramStatsEvent | NewStreamEvent} args
|
|
41
|
-
*/
|
|
42
|
-
static callback(args: SessionReadyEvent | SessionCloseEvent | DatagramReceivedEvent | DatagramSendEvent | GoawayReceivedEvent | SessionStatsEvent | DatagramStatsEvent | NewStreamEvent): void;
|
|
43
|
-
/**
|
|
44
|
-
* @param {object} args
|
|
45
|
-
* @param {import('./types').NativeHttp3WTSession} [args.object]
|
|
46
|
-
* @param {Http3Server | Http3Client} args.parentobj
|
|
47
|
-
* @param {any | undefined} [args.header= undefined]
|
|
48
|
-
*/
|
|
49
|
-
constructor(args: {
|
|
50
|
-
object?: import("./types").NativeHttp3WTSession | undefined;
|
|
51
|
-
parentobj: Http3Server | Http3Client;
|
|
52
|
-
header?: any | undefined;
|
|
53
|
-
});
|
|
54
|
-
objint: import("./types").NativeHttp3WTSession | undefined;
|
|
55
|
-
parentobj: import("./server").Http3Server | import("./client").Http3Client;
|
|
56
|
-
/** @type {import('./types').WebTransportSessionState} */
|
|
57
|
-
state: import('./types').WebTransportSessionState;
|
|
58
|
-
/** @type {((value?: any) => void) | null | undefined} */
|
|
59
|
-
readyResolve: ((value?: any) => void) | null | undefined;
|
|
60
|
-
/** @type {(() => void) | null | undefined} */
|
|
61
|
-
closeHook: (() => void) | null | undefined;
|
|
62
|
-
/** @type {(any | null | undefined)} */
|
|
63
|
-
header: (any | null | undefined);
|
|
64
|
-
/** @type {Promise<void>} */
|
|
65
|
-
ready: Promise<void>;
|
|
66
|
-
readyReject: (reason?: any) => void;
|
|
67
|
-
/** @type {WebTransportReliabilityMode} */
|
|
68
|
-
reliability: WebTransportReliabilityMode;
|
|
69
|
-
/** @type {WebTransportCongestionControl} */
|
|
70
|
-
congestionControl: WebTransportCongestionControl;
|
|
71
|
-
/** @type {Promise<WebTransportCloseInfo>} */
|
|
72
|
-
closed: Promise<WebTransportCloseInfo>;
|
|
73
|
-
closedResolve: (value: import("./dom").WebTransportCloseInfo | PromiseLike<import("./dom").WebTransportCloseInfo>) => void;
|
|
74
|
-
closedReject: (reason?: any) => void;
|
|
75
|
-
/** @type {Promise<undefined>} */
|
|
76
|
-
draining: Promise<undefined>;
|
|
77
|
-
drainingResolve: (value: PromiseLike<undefined> | undefined) => void;
|
|
78
|
-
drainingReject: (reason?: any) => void;
|
|
79
|
-
/** @type {ReadableStream<WebTransportBidirectionalStream>} */
|
|
80
|
-
incomingBidirectionalStreams: ReadableStream<WebTransportBidirectionalStream>;
|
|
81
|
-
incomBiDiController: ReadableStreamDefaultController<import("./dom").WebTransportBidirectionalStream>;
|
|
82
|
-
/** @type {ReadableStream<WebTransportReceiveStream>} */
|
|
83
|
-
incomingUnidirectionalStreams: ReadableStream<WebTransportReceiveStream>;
|
|
84
|
-
incomUniDiController: ReadableStreamDefaultController<import("./dom").WebTransportReceiveStream>;
|
|
85
|
-
/** @type {Array<() => void>} */
|
|
86
|
-
writeDatagramRes: (() => void)[];
|
|
87
|
-
/** @type {Array<(err?: Error) => void>} */
|
|
88
|
-
writeDatagramRej: ((err?: Error) => void)[];
|
|
89
|
-
/** @type {Array<Promise<void>>} */
|
|
90
|
-
writeDatagramProm: Array<Promise<void>>;
|
|
91
|
-
/** @type {WebTransportDatagramDuplexStream} */
|
|
92
|
-
datagrams: WebTransportDatagramDuplexStream;
|
|
93
|
-
incomDatagramController: import("stream/web").ReadableByteStreamController;
|
|
94
|
-
outgoDatagramController: import("stream/web").WritableStreamDefaultController;
|
|
95
|
-
/** @type {Array<(stream: WebTransportBidirectionalStream) => void>} */
|
|
96
|
-
resolveBiDi: ((stream: WebTransportBidirectionalStream) => void)[];
|
|
97
|
-
/** @type {Array<(stream: WebTransportSendStream) => void>} */
|
|
98
|
-
resolveUniDi: ((stream: WebTransportSendStream) => void)[];
|
|
99
|
-
/** @type {Array<(err?: Error) => void>} */
|
|
100
|
-
rejectBiDi: ((err?: Error) => void)[];
|
|
101
|
-
/** @type {Array<(err?: Error) => void>} */
|
|
102
|
-
rejectUniDi: ((err?: Error) => void)[];
|
|
103
|
-
/** @type {Array<(stats: WebTransportStats) => void>} */
|
|
104
|
-
resolveSessionStats: ((stats: WebTransportStats) => void)[];
|
|
105
|
-
/** @type {Array<(err?: Error) => void>} */
|
|
106
|
-
rejectSessionStats: ((err?: Error) => void)[];
|
|
107
|
-
/** @type {Array<(stats: WebTransportDatagramStats) => void>} */
|
|
108
|
-
resolveDatagramStats: ((stats: WebTransportDatagramStats) => void)[];
|
|
109
|
-
/** @type {Array<(err?: Error) => void>} */
|
|
110
|
-
rejectDatagramStats: ((err?: Error) => void)[];
|
|
111
|
-
/** @type {Set<WebTransportSendStream>} */
|
|
112
|
-
sendStreams: Set<WebTransportSendStream>;
|
|
113
|
-
/** @type {Set<WebTransportReceiveStream>} */
|
|
114
|
-
receiveStreams: Set<WebTransportReceiveStream>;
|
|
115
|
-
/** @type {Set<Http3WTStream>} */
|
|
116
|
-
streamObjs: Set<Http3WTStream>;
|
|
117
|
-
/** @type {Set<WritableStreamDefaultController>} */
|
|
118
|
-
sendStreamsController: Set<WritableStreamDefaultController>;
|
|
119
|
-
/** @type {Set<ReadableStreamDefaultController>} */
|
|
120
|
-
receiveStreamsController: Set<ReadableStreamDefaultController>;
|
|
121
|
-
/**
|
|
122
|
-
* @param {NativeHttp3WTSession} object
|
|
123
|
-
*/
|
|
124
|
-
setSessionObj(object: NativeHttp3WTSession): void;
|
|
125
|
-
getStats(): Promise<any>;
|
|
126
|
-
/**
|
|
127
|
-
* @param {SessionStatsEvent} evt
|
|
128
|
-
*/
|
|
129
|
-
onSessionStats({ timestamp, expiredOutgoing, lostOutgoing, minRtt, smoothedRtt, rttVariation, estimatedSendRateBps }: SessionStatsEvent): void;
|
|
130
|
-
/**
|
|
131
|
-
* @param {DatagramStatsEvent} evt
|
|
132
|
-
*/
|
|
133
|
-
onDatagramStats({ timestamp, expiredOutgoing, lostOutgoing }: DatagramStatsEvent): void;
|
|
134
|
-
waitForDatagramsSend(): Promise<void>;
|
|
135
|
-
notifySessionDraining(): void;
|
|
136
|
-
/**
|
|
137
|
-
* @param {Http3WTStream} stream
|
|
138
|
-
*/
|
|
139
|
-
addStreamObj(stream: Http3WTStream): void;
|
|
140
|
-
/**
|
|
141
|
-
* @param {Http3WTStream} stream
|
|
142
|
-
*/
|
|
143
|
-
removeStreamObj(stream: Http3WTStream): void;
|
|
144
|
-
/**
|
|
145
|
-
* @param {WebTransportSendStream} stream
|
|
146
|
-
* @param {WritableStreamDefaultController} controller
|
|
147
|
-
*/
|
|
148
|
-
addSendStream(stream: WebTransportSendStream, controller: WritableStreamDefaultController): void;
|
|
149
|
-
/**
|
|
150
|
-
* @param {WebTransportSendStream} stream
|
|
151
|
-
* @param {WritableStreamDefaultController} controller
|
|
152
|
-
*/
|
|
153
|
-
removeSendStream(stream: WebTransportSendStream, controller: WritableStreamDefaultController): void;
|
|
154
|
-
/**
|
|
155
|
-
* @param {WebTransportReceiveStream } stream
|
|
156
|
-
* @param {ReadableStreamDefaultController} controller
|
|
157
|
-
*/
|
|
158
|
-
addReceiveStream(stream: WebTransportReceiveStream, controller: ReadableStreamDefaultController): void;
|
|
159
|
-
/**
|
|
160
|
-
* @param {WebTransportReceiveStream } stream
|
|
161
|
-
* @param {ReadableStreamDefaultController} controller
|
|
162
|
-
*/
|
|
163
|
-
removeReceiveStream(stream: WebTransportReceiveStream, controller: ReadableStreamDefaultController): void;
|
|
164
|
-
/**
|
|
165
|
-
* @returns {Promise<WebTransportBidirectionalStream>}
|
|
166
|
-
*/
|
|
167
|
-
createBidirectionalStream(): Promise<WebTransportBidirectionalStream>;
|
|
168
|
-
/**
|
|
169
|
-
*@returns {Promise<WebTransportSendStream>}
|
|
170
|
-
*/
|
|
171
|
-
createUnidirectionalStream(): Promise<WebTransportSendStream>;
|
|
172
|
-
/**
|
|
173
|
-
* @param {object} [closeInfo]
|
|
174
|
-
* @param {number} closeInfo.closeCode
|
|
175
|
-
* @param {string} closeInfo.reason
|
|
176
|
-
* @returns {void}
|
|
177
|
-
*/
|
|
178
|
-
close(closeInfo?: {
|
|
179
|
-
closeCode: number;
|
|
180
|
-
reason: string;
|
|
181
|
-
} | undefined): void;
|
|
182
|
-
onReady(): void;
|
|
183
|
-
/**
|
|
184
|
-
* @param {SessionCloseEvent} args
|
|
185
|
-
*/
|
|
186
|
-
onClose(args: SessionCloseEvent): void;
|
|
187
|
-
/**
|
|
188
|
-
* @param {NewStreamEvent} args
|
|
189
|
-
*/
|
|
190
|
-
onStream(args: NewStreamEvent): void;
|
|
191
|
-
/**
|
|
192
|
-
* @param {DatagramReceivedEvent} args
|
|
193
|
-
*/
|
|
194
|
-
onDatagramReceived(args: DatagramReceivedEvent): void;
|
|
195
|
-
/**
|
|
196
|
-
* @param {DatagramSendEvent} args
|
|
197
|
-
*/
|
|
198
|
-
onDatagramSend(args: DatagramSendEvent): void;
|
|
199
|
-
/**
|
|
200
|
-
* @param {GoawayReceivedEvent} args
|
|
201
|
-
*/
|
|
202
|
-
onGoAwayReceived(args: GoawayReceivedEvent): void;
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* WebTransport session events
|
|
206
|
-
*/
|
|
207
|
-
export type WebTransportSessionEventHandler = import('./types').WebTransportSessionEventHandler;
|
|
208
|
-
/**
|
|
209
|
-
* WebTransport session events
|
|
210
|
-
*/
|
|
211
|
-
export type SessionReadyEvent = import('./types').SessionReadyEvent;
|
|
212
|
-
/**
|
|
213
|
-
* WebTransport session events
|
|
214
|
-
*/
|
|
215
|
-
export type SessionCloseEvent = import('./types').SessionCloseEvent;
|
|
216
|
-
/**
|
|
217
|
-
* WebTransport session events
|
|
218
|
-
*/
|
|
219
|
-
export type DatagramReceivedEvent = import('./types').DatagramReceivedEvent;
|
|
220
|
-
/**
|
|
221
|
-
* WebTransport session events
|
|
222
|
-
*/
|
|
223
|
-
export type DatagramSendEvent = import('./types').DatagramSendEvent;
|
|
224
|
-
/**
|
|
225
|
-
* WebTransport session events
|
|
226
|
-
*/
|
|
227
|
-
export type GoawayReceivedEvent = import('./types').GoawayReceivedEvent;
|
|
228
|
-
/**
|
|
229
|
-
* WebTransport session events
|
|
230
|
-
*/
|
|
231
|
-
export type DatagramStatsEvent = import('./types').DatagramStatsEvent;
|
|
232
|
-
/**
|
|
233
|
-
* WebTransport session events
|
|
234
|
-
*/
|
|
235
|
-
export type SessionStatsEvent = import('./types').SessionStatsEvent;
|
|
236
|
-
/**
|
|
237
|
-
* WebTransport session events
|
|
238
|
-
*/
|
|
239
|
-
export type NewStreamEvent = import('./types').NewStreamEvent;
|
|
240
|
-
/**
|
|
241
|
-
* WebTransport session events
|
|
242
|
-
*/
|
|
243
|
-
export type WebTransportCloseInfo = import('./dom').WebTransportCloseInfo;
|
|
244
|
-
/**
|
|
245
|
-
* WebTransport session events
|
|
246
|
-
*/
|
|
247
|
-
export type WebTransportBidirectionalStream = import('./dom').WebTransportBidirectionalStream;
|
|
248
|
-
/**
|
|
249
|
-
* WebTransport session events
|
|
250
|
-
*/
|
|
251
|
-
export type WebTransportSendStream = import('./dom').WebTransportSendStream;
|
|
252
|
-
/**
|
|
253
|
-
* WebTransport session events
|
|
254
|
-
*/
|
|
255
|
-
export type WebTransportReceiveStream = import('./dom').WebTransportReceiveStream;
|
|
256
|
-
/**
|
|
257
|
-
* WebTransport session events
|
|
258
|
-
*/
|
|
259
|
-
export type WebTransportDatagramDuplexStream = import('./dom').WebTransportDatagramDuplexStream;
|
|
260
|
-
/**
|
|
261
|
-
* WebTransport session events
|
|
262
|
-
*/
|
|
263
|
-
export type WebTransportReliabilityMode = import('./dom').WebTransportReliabilityMode;
|
|
264
|
-
/**
|
|
265
|
-
* WebTransport session events
|
|
266
|
-
*/
|
|
267
|
-
export type WebTransportCongestionControl = import('./dom').WebTransportCongestionControl;
|
|
268
|
-
/**
|
|
269
|
-
* WebTransport session events
|
|
270
|
-
*/
|
|
271
|
-
export type WebTransportStats = import('./dom').WebTransportStats;
|
|
272
|
-
/**
|
|
273
|
-
* WebTransport session events
|
|
274
|
-
*/
|
|
275
|
-
export type WebTransportDatagramStats = import('./dom').WebTransportDatagramStats;
|
|
276
|
-
/**
|
|
277
|
-
* Public API
|
|
278
|
-
*/
|
|
279
|
-
export type NativeHttp3WTSession = import('./types').NativeHttp3WTSession;
|
|
280
|
-
/**
|
|
281
|
-
* WebTransport session events
|
|
282
|
-
*/
|
|
283
|
-
export type WebTransportSession = import('./types').WebTransportSession;
|
|
284
|
-
/**
|
|
285
|
-
* WebTransport session events
|
|
286
|
-
*/
|
|
287
|
-
export type Http3Server = import('./server').Http3Server;
|
|
288
|
-
/**
|
|
289
|
-
* WebTransport session events
|
|
290
|
-
*/
|
|
291
|
-
export type Http3Client = import('./client').Http3Client;
|
|
292
|
-
/**
|
|
293
|
-
* WebTransport session events
|
|
294
|
-
*/
|
|
295
|
-
export type WritableStreamDefaultController = import('stream/web').WritableStreamDefaultController;
|
|
296
|
-
import { ReadableStream } from "stream/web";
|
|
297
|
-
import { Http3WTStream } from "./stream.js";
|
|
298
|
-
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../lib/session.js"],"names":[],"mappings":";AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;;GAGG;AACH;IAwgBE;;OAEG;IACH,sBAFW,iBAAiB,GAAG,iBAAiB,GAAG,qBAAqB,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,cAAc,QA8C3K;IAtjBD;;;;;OAKG;IACH;QAJyD,MAAM;QACpB,SAAS,EAAzC,WAAW,GAAG,WAAW;QACF,MAAM,GAA7B,GAAG,GAAG,SAAS;OAiIz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