@fails-components/webtransport 0.1.0-macarmbuild.5 → 0.1.0-macarmbuild.6
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/CMakeLists.txt +1 -0
- package/dist/lib/client.d.ts +74 -0
- package/dist/lib/client.d.ts.map +1 -0
- package/dist/lib/dom.d.ts +70 -0
- package/dist/lib/dom.d.ts.map +1 -0
- package/dist/lib/event-loop.d.ts +26 -0
- package/dist/lib/event-loop.d.ts.map +1 -0
- package/dist/lib/index.d.ts +79 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/native.d.ts +2 -0
- package/dist/lib/native.d.ts.map +1 -0
- package/dist/lib/server.d.ts +75 -0
- package/dist/lib/server.d.ts.map +1 -0
- package/dist/lib/session.d.ts +221 -0
- package/dist/lib/session.d.ts.map +1 -0
- package/dist/lib/stream.d.ts +116 -0
- package/dist/lib/stream.d.ts.map +1 -0
- package/dist/lib/transport.d.ts +25 -0
- package/dist/lib/transport.d.ts.map +1 -0
- package/dist/lib/types.d.ts +157 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +6 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/webtransport.d.ts +35 -0
- package/dist/lib/webtransport.d.ts.map +1 -0
- package/dist/test/bidirectional-streams.spec.d.ts +5 -0
- package/dist/test/bidirectional-streams.spec.d.ts.map +1 -0
- package/dist/test/datagrams.spec.d.ts +5 -0
- package/dist/test/datagrams.spec.d.ts.map +1 -0
- package/dist/test/echoclient.d.ts +2 -0
- package/dist/test/echoclient.d.ts.map +1 -0
- package/dist/test/echoserver.d.ts +2 -0
- package/dist/test/echoserver.d.ts.map +1 -0
- package/dist/test/event-loop.spec.d.ts +2 -0
- package/dist/test/event-loop.spec.d.ts.map +1 -0
- package/dist/test/fixtures/certificate.d.ts +21 -0
- package/dist/test/fixtures/certificate.d.ts.map +1 -0
- package/dist/test/fixtures/chai.d.ts +2 -0
- package/dist/test/fixtures/chai.d.ts.map +1 -0
- package/dist/test/fixtures/read-stream.d.ts +10 -0
- package/dist/test/fixtures/read-stream.d.ts.map +1 -0
- package/dist/test/fixtures/reader-value.d.ts +7 -0
- package/dist/test/fixtures/reader-value.d.ts.map +1 -0
- package/dist/test/fixtures/server.d.ts +10 -0
- package/dist/test/fixtures/server.d.ts.map +1 -0
- package/dist/test/fixtures/write-stream.d.ts +10 -0
- package/dist/test/fixtures/write-stream.d.ts.map +1 -0
- package/dist/test/test.d.ts +2 -0
- package/dist/test/test.d.ts.map +1 -0
- package/dist/test/testsuite.d.ts +25 -0
- package/dist/test/testsuite.d.ts.map +1 -0
- package/dist/test/unidirectional-streams.spec.d.ts +5 -0
- package/dist/test/unidirectional-streams.spec.d.ts.map +1 -0
- package/lib/index.js +1 -0
- package/lib/server.js +2 -1
- package/lib/types.ts +8 -0
- package/lib/utils.js +1 -2
- package/package.json +5 -2
- package/test/bidirectional-streams.spec.js +3 -2
- package/test/datagrams.spec.js +3 -2
- package/test/{event-loop.specoff.js → event-loop.spec.js} +7 -6
- package/test/fixtures/certificate.js +9 -9
- package/test/fixtures/chai.js +6 -0
- package/test/fixtures/reader-value.js +1 -2
- package/test/fixtures/write-stream.js +1 -2
- package/test/unidirectional-streams.spec.js +2 -1
- package/test/suite.specoff.js +0 -9
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* WebTransport stream events
|
|
4
|
+
* @typedef {import('./types').WebTransportStreamEventHandler} WebTransportStreamEventHandler
|
|
5
|
+
* @typedef {import('./types').StreamRecvSignalEvent} StreamRecvSignalEvent
|
|
6
|
+
* @typedef {import('./types').StreamReadEvent} StreamReadEvent
|
|
7
|
+
* @typedef {import('./types').StreamWriteEvent} StreamWriteEvent
|
|
8
|
+
* @typedef {import('./types').StreamResetEvent} StreamResetEvent
|
|
9
|
+
* @typedef {import('./types').StreamNetworkFinishEvent} StreamNetworkFinishEvent
|
|
10
|
+
*
|
|
11
|
+
* @typedef {import('./types').NativeHttp3WTStream} NativeHttp3WTStream
|
|
12
|
+
*
|
|
13
|
+
* @typedef {import('./session').Http3WTSession} Http3WTSession
|
|
14
|
+
*
|
|
15
|
+
* @typedef {import('stream/web').WritableStreamDefaultController} WritableStreamDefaultController
|
|
16
|
+
*/
|
|
17
|
+
export class Http3WTStream {
|
|
18
|
+
/**
|
|
19
|
+
* @param {StreamRecvSignalEvent | StreamReadEvent | StreamWriteEvent | StreamResetEvent | StreamNetworkFinishEvent} args
|
|
20
|
+
*/
|
|
21
|
+
static callback(args: StreamRecvSignalEvent | StreamReadEvent | StreamWriteEvent | StreamResetEvent | StreamNetworkFinishEvent): void;
|
|
22
|
+
/**
|
|
23
|
+
* @param {object} args
|
|
24
|
+
* @param {NativeHttp3WTStream} args.object
|
|
25
|
+
* @param {Http3WTSession} args.parentobj
|
|
26
|
+
* @param {object} args.transport
|
|
27
|
+
* @param {boolean} args.bidirectional
|
|
28
|
+
* @param {boolean} args.incoming
|
|
29
|
+
*/
|
|
30
|
+
constructor(args: {
|
|
31
|
+
object: NativeHttp3WTStream;
|
|
32
|
+
parentobj: Http3WTSession;
|
|
33
|
+
transport: object;
|
|
34
|
+
bidirectional: boolean;
|
|
35
|
+
incoming: boolean;
|
|
36
|
+
});
|
|
37
|
+
objint: import("./types").NativeHttp3WTStream;
|
|
38
|
+
parentobj: import("./session").Http3WTSession;
|
|
39
|
+
transport: object;
|
|
40
|
+
bidirectional: boolean;
|
|
41
|
+
incoming: boolean;
|
|
42
|
+
closed: boolean;
|
|
43
|
+
/** @type {Promise<void> | null} */
|
|
44
|
+
pendingoperation: Promise<void> | null;
|
|
45
|
+
pendingres: (() => void) | null;
|
|
46
|
+
readable: ReadableStream<any> | undefined;
|
|
47
|
+
readableController: import("stream/web").ReadableStreamController<any>;
|
|
48
|
+
cancelres: (() => void) | null;
|
|
49
|
+
readableclosed: boolean;
|
|
50
|
+
writable: WritableStream<any> | undefined;
|
|
51
|
+
writableController: import("stream/web").WritableStreamDefaultController;
|
|
52
|
+
abortres: (() => void) | null;
|
|
53
|
+
/**
|
|
54
|
+
* @param {import('./types').StreamRecvSignalEvent} args
|
|
55
|
+
* @returns {void}
|
|
56
|
+
*/
|
|
57
|
+
onStreamRecvSignal(args: import('./types').StreamRecvSignalEvent): void;
|
|
58
|
+
writableclosed: boolean | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* @param {StreamReadEvent} args
|
|
61
|
+
* @returns {void}
|
|
62
|
+
*/
|
|
63
|
+
onStreamRead(args: StreamReadEvent): void;
|
|
64
|
+
/**
|
|
65
|
+
* @param {StreamWriteEvent} args
|
|
66
|
+
*/
|
|
67
|
+
onStreamWrite(args: StreamWriteEvent): void;
|
|
68
|
+
/**
|
|
69
|
+
* @param {StreamResetEvent} args
|
|
70
|
+
*/
|
|
71
|
+
onStreamReset(args: StreamResetEvent): void;
|
|
72
|
+
/**
|
|
73
|
+
* @param {StreamNetworkFinishEvent} args
|
|
74
|
+
*/
|
|
75
|
+
onStreamNetworkFinish(args: StreamNetworkFinishEvent): void;
|
|
76
|
+
stopSendingRecv: boolean | undefined;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* WebTransport stream events
|
|
80
|
+
*/
|
|
81
|
+
export type WebTransportStreamEventHandler = import('./types').WebTransportStreamEventHandler;
|
|
82
|
+
/**
|
|
83
|
+
* WebTransport stream events
|
|
84
|
+
*/
|
|
85
|
+
export type StreamRecvSignalEvent = import('./types').StreamRecvSignalEvent;
|
|
86
|
+
/**
|
|
87
|
+
* WebTransport stream events
|
|
88
|
+
*/
|
|
89
|
+
export type StreamReadEvent = import('./types').StreamReadEvent;
|
|
90
|
+
/**
|
|
91
|
+
* WebTransport stream events
|
|
92
|
+
*/
|
|
93
|
+
export type StreamWriteEvent = import('./types').StreamWriteEvent;
|
|
94
|
+
/**
|
|
95
|
+
* WebTransport stream events
|
|
96
|
+
*/
|
|
97
|
+
export type StreamResetEvent = import('./types').StreamResetEvent;
|
|
98
|
+
/**
|
|
99
|
+
* WebTransport stream events
|
|
100
|
+
*/
|
|
101
|
+
export type StreamNetworkFinishEvent = import('./types').StreamNetworkFinishEvent;
|
|
102
|
+
/**
|
|
103
|
+
* WebTransport stream events
|
|
104
|
+
*/
|
|
105
|
+
export type NativeHttp3WTStream = import('./types').NativeHttp3WTStream;
|
|
106
|
+
/**
|
|
107
|
+
* WebTransport stream events
|
|
108
|
+
*/
|
|
109
|
+
export type Http3WTSession = import('./session').Http3WTSession;
|
|
110
|
+
/**
|
|
111
|
+
* WebTransport stream events
|
|
112
|
+
*/
|
|
113
|
+
export type WritableStreamDefaultController = import('stream/web').WritableStreamDefaultController;
|
|
114
|
+
import { ReadableStream } from "stream/web";
|
|
115
|
+
import { WritableStream } from "stream/web";
|
|
116
|
+
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../lib/stream.js"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;GAcG;AAEH;IA6QE;;OAEG;IACH,sBAFW,qBAAqB,GAAG,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,wBAAwB,QAmClH;IAhTD;;;;;;;OAOG;IACH;QANqC,MAAM,EAAhC,mBAAmB;QACE,SAAS,EAA9B,cAAc;QACD,SAAS,EAAtB,MAAM;QACQ,aAAa,EAA3B,OAAO;QACO,QAAQ,EAAtB,OAAO;OAmHjB;IAhHC,8CAAyB;IAEzB,8CAA+B;IAC/B,kBAA+B;IAC/B,uBAAuC;IACvC,kBAA6B;IAC7B,gBAAmB;IAEnB,mCAAmC;IACnC,kBADW,QAAQ,IAAI,CAAC,GAAG,IAAI,CACH;IAC5B,mBAkGkB,IAAI,SAlGA;IAGpB,0CA+BC;IA5BK,uEAAoC;IAclC,kBA4EQ,IAAI,SA5EY;IAQ1B,wBAA0B;IAShC,0CAwDC;IArDK,yEAAoC;IA8ClC,iBAcQ,IAAI,SAdW;IAkBnC;;;OAGG;IACH,yBAHW,OAAO,SAAS,EAAE,qBAAqB,GACrC,IAAI,CA0ChB;IAhBO,oCAA0B;IAkBlC;;;OAGG;IACH,mBAHW,eAAe,GACb,IAAI,CAuBhB;IAED;;OAEG;IACH,oBAFW,gBAAgB,QAY1B;IAED;;OAEG;IACH,oBAFW,gBAAgB,QAe1B;IAED;;OAEG;IACH,4BAFW,wBAAwB,QAoClC;IAzBK,qCAA2B;CAgElC;;;;6CAhUY,OAAO,SAAS,EAAE,8BAA8B;;;;oCAChD,OAAO,SAAS,EAAE,qBAAqB;;;;8BACvC,OAAO,SAAS,EAAE,eAAe;;;;+BACjC,OAAO,SAAS,EAAE,gBAAgB;;;;+BAClC,OAAO,SAAS,EAAE,gBAAgB;;;;uCAClC,OAAO,SAAS,EAAE,wBAAwB;;;;kCAE1C,OAAO,SAAS,EAAE,mBAAmB;;;;6BAErC,OAAO,WAAW,EAAE,cAAc;;;;8CAElC,OAAO,YAAY,EAAE,+BAA+B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export class Http3WebTransport {
|
|
2
|
+
/**
|
|
3
|
+
* @typedef {object} TransportCallbackEvent
|
|
4
|
+
* @property {{ jsobj: { customCallback: (args: any) => void }}} object
|
|
5
|
+
* @property {string} purpose
|
|
6
|
+
*
|
|
7
|
+
* @param {TransportCallbackEvent} args
|
|
8
|
+
*/
|
|
9
|
+
static transportCallback(args: {
|
|
10
|
+
object: {
|
|
11
|
+
jsobj: {
|
|
12
|
+
customCallback: (args: any) => void;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
purpose: string;
|
|
16
|
+
}): void;
|
|
17
|
+
/**
|
|
18
|
+
* @param {*} args
|
|
19
|
+
* @param {'server' | 'client'} purpose
|
|
20
|
+
*/
|
|
21
|
+
constructor(args: any, purpose: 'server' | 'client');
|
|
22
|
+
transportInt: any;
|
|
23
|
+
sessions: {};
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../lib/transport.js"],"names":[],"mappings":"AAGA;IAkBE;;;;;;OAMG;IACH;;;uCALgD,GAAG,KAAK,IAAI;;;iBAC9C,MAAM;aAgBnB;IApCD;;;OAGG;IACH,gCAFW,QAAQ,GAAG,QAAQ,EAa7B;IAPG,kBAAyE;IAM3E,aAAkB;CAuBrB"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import type { WebTransport } from './dom';
|
|
2
|
+
/**
|
|
3
|
+
* Native Http3WTSession counterpart
|
|
4
|
+
*/
|
|
5
|
+
export interface NativeHttp3WTSession {
|
|
6
|
+
jsobj: WebTransportSessionEventHandler;
|
|
7
|
+
writeDatagram: (chunk: Uint8Array) => void;
|
|
8
|
+
orderUnidiStream: () => void;
|
|
9
|
+
orderBidiStream: () => void;
|
|
10
|
+
close: (arg: {
|
|
11
|
+
code: number;
|
|
12
|
+
reason: string;
|
|
13
|
+
}) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Native Http3WTStream counterpart
|
|
17
|
+
*/
|
|
18
|
+
export interface NativeHttp3WTStream {
|
|
19
|
+
jsobj: WebTransportStreamEventHandler;
|
|
20
|
+
startReading: () => void;
|
|
21
|
+
stopReading: () => void;
|
|
22
|
+
stopSending: (code: number) => void;
|
|
23
|
+
resetStream: (code: number) => void;
|
|
24
|
+
writeChunk: (buf: Uint8Array) => void;
|
|
25
|
+
streamFinal: () => void;
|
|
26
|
+
}
|
|
27
|
+
export declare type Purpose = 'StreamRecvSignal' | 'StreamRead' | 'StreamWrite' | 'StreamReset' | 'StreamNetworkFinish';
|
|
28
|
+
export declare type NetTask = 'stopSending' | 'resetStream' | 'streamFinal';
|
|
29
|
+
export interface StreamRecvSignalEvent {
|
|
30
|
+
object: NativeHttp3WTStream;
|
|
31
|
+
purpose: 'StreamRecvSignal';
|
|
32
|
+
code: number;
|
|
33
|
+
nettask: NetTask;
|
|
34
|
+
}
|
|
35
|
+
export interface StreamReadEvent {
|
|
36
|
+
object: NativeHttp3WTStream;
|
|
37
|
+
purpose: 'StreamRead';
|
|
38
|
+
data?: Uint8Array;
|
|
39
|
+
fin?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface StreamWriteEvent {
|
|
42
|
+
object: NativeHttp3WTStream;
|
|
43
|
+
purpose: 'StreamWrite';
|
|
44
|
+
}
|
|
45
|
+
export interface StreamResetEvent {
|
|
46
|
+
object: NativeHttp3WTStream;
|
|
47
|
+
purpose: 'StreamReset';
|
|
48
|
+
}
|
|
49
|
+
export interface StreamNetworkFinishEvent {
|
|
50
|
+
object: NativeHttp3WTStream;
|
|
51
|
+
purpose: 'StreamNetworkFinish';
|
|
52
|
+
nettask: NetTask;
|
|
53
|
+
}
|
|
54
|
+
export interface WebTransportStreamEventHandler {
|
|
55
|
+
onStreamRecvSignal: (evt: StreamRecvSignalEvent) => void;
|
|
56
|
+
onStreamRead: (evt: StreamReadEvent) => void;
|
|
57
|
+
onStreamWrite: (evt: StreamWriteEvent) => void;
|
|
58
|
+
onStreamReset: (evt: StreamResetEvent) => void;
|
|
59
|
+
onStreamNetworkFinish: (evt: StreamNetworkFinishEvent) => void;
|
|
60
|
+
}
|
|
61
|
+
export interface SessionReadyEvent {
|
|
62
|
+
object: NativeHttp3WTSession;
|
|
63
|
+
purpose: 'SessionReady';
|
|
64
|
+
}
|
|
65
|
+
export interface SessionCloseEvent {
|
|
66
|
+
object: NativeHttp3WTSession;
|
|
67
|
+
purpose: 'SessionClose';
|
|
68
|
+
errorcode: number;
|
|
69
|
+
error: string;
|
|
70
|
+
}
|
|
71
|
+
export interface DatagramReceivedEvent {
|
|
72
|
+
object: NativeHttp3WTSession;
|
|
73
|
+
purpose: 'DatagramReceived';
|
|
74
|
+
datagram: Uint8Array;
|
|
75
|
+
}
|
|
76
|
+
export interface DatagramSendEvent {
|
|
77
|
+
object: NativeHttp3WTSession;
|
|
78
|
+
purpose: 'DatagramSend';
|
|
79
|
+
}
|
|
80
|
+
export interface NewStreamEvent {
|
|
81
|
+
object: NativeHttp3WTSession;
|
|
82
|
+
purpose: 'Http3WTStreamVisitor';
|
|
83
|
+
stream: NativeHttp3WTStream;
|
|
84
|
+
transport: object;
|
|
85
|
+
bidirectional: boolean;
|
|
86
|
+
incoming: boolean;
|
|
87
|
+
}
|
|
88
|
+
export interface WebTransportSessionEventHandler {
|
|
89
|
+
onReady: (evt: SessionReadyEvent) => void;
|
|
90
|
+
onClose: (evt: SessionCloseEvent) => void;
|
|
91
|
+
onDatagramReceived: (evt: DatagramReceivedEvent) => void;
|
|
92
|
+
onDatagramSend: (evt: DatagramSendEvent) => void;
|
|
93
|
+
onStream: (evt: NewStreamEvent) => void;
|
|
94
|
+
closeHook?: (() => void) | null;
|
|
95
|
+
}
|
|
96
|
+
export interface ClientConnectedEvent {
|
|
97
|
+
purpose: 'ClientConnected';
|
|
98
|
+
success: boolean;
|
|
99
|
+
}
|
|
100
|
+
export interface ClientWebtransportSupportEvent {
|
|
101
|
+
purpose: 'ClientWebtransportSupport';
|
|
102
|
+
}
|
|
103
|
+
export interface Http3WTSessionVisitorEvent {
|
|
104
|
+
purpose: 'Http3WTSessionVisitor';
|
|
105
|
+
session: NativeHttp3WTSession;
|
|
106
|
+
}
|
|
107
|
+
export interface Http3ClientEventHandler {
|
|
108
|
+
onClientConnected: (evt: ClientConnectedEvent) => void;
|
|
109
|
+
onClientWebTransportSupport: (evt: ClientWebtransportSupportEvent) => void;
|
|
110
|
+
onHttp3WTSessionVisitor: (evt: Http3WTSessionVisitorEvent) => void;
|
|
111
|
+
}
|
|
112
|
+
export interface Http3WTServerSessionVisitorEvent extends Http3WTSessionVisitorEvent {
|
|
113
|
+
path: string;
|
|
114
|
+
object: any;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The Http3 server is listening on the specified port
|
|
118
|
+
*/
|
|
119
|
+
export interface Http3ServerListeningEvent {
|
|
120
|
+
purpose: 'Http3ServerListening';
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The Http3 server has stopped listening on the specified port
|
|
124
|
+
*/
|
|
125
|
+
export interface ServerStatusEvent {
|
|
126
|
+
port: number | null;
|
|
127
|
+
host: string | null;
|
|
128
|
+
purpose: 'ServerStatus';
|
|
129
|
+
status: 'error' | 'listening' | 'close';
|
|
130
|
+
}
|
|
131
|
+
export interface Http3ServerEventHandler {
|
|
132
|
+
onHttp3WTSessionVisitor: (evt: Http3WTServerSessionVisitorEvent) => void;
|
|
133
|
+
onServerError: () => void;
|
|
134
|
+
onServerListening: () => void;
|
|
135
|
+
onServerClose: () => void;
|
|
136
|
+
onServerStatus: (evt: ServerStatusEvent) => void;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* A defered promise with the value T
|
|
140
|
+
*/
|
|
141
|
+
export interface Deferred<T = unknown> {
|
|
142
|
+
promise: Promise<T>;
|
|
143
|
+
resolve: (value?: T) => void;
|
|
144
|
+
reject: (reason?: any) => void;
|
|
145
|
+
}
|
|
146
|
+
export declare type WebTransportSessionState = 'connected' | 'closed' | 'failed';
|
|
147
|
+
export interface WebTransportSession extends WebTransport {
|
|
148
|
+
state: WebTransportSessionState;
|
|
149
|
+
}
|
|
150
|
+
export interface Http3ServerInit {
|
|
151
|
+
port: number;
|
|
152
|
+
host: string;
|
|
153
|
+
secret: string;
|
|
154
|
+
cert: string;
|
|
155
|
+
privKey: string;
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEzC;;GAEG;AACF,MAAM,WAAW,oBAAoB;IACpC,KAAK,EAAE,+BAA+B,CAAA;IACtC,aAAa,EAAE,CAAC,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,EAAE,OAAO,GAAG,WAAW,GAAG,OAAO,CAAA;CACxC;AAGD,MAAM,WAAW,uBAAuB;IACtC,uBAAuB,EAAE,CAAC,GAAG,EAAE,gCAAgC,KAAK,IAAI,CAAA;IACxE,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,iBAAiB,EAAE,MAAM,IAAI,CAAA;IAC7B,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,cAAc,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,CAAA;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC,GAAG,OAAO;IACnC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACnB,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAA;IAC5B,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,CAAA;CAC/B;AAED,oBAAY,wBAAwB,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAExE,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,KAAK,EAAE,wBAAwB,CAAA;CAChC;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,0EAiBC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('./dom').WebTransportCloseInfo} WebTransportCloseInfo
|
|
3
|
+
* @typedef {import('./dom').WebTransportBidirectionalStream} WebTransportBidirectionalStream
|
|
4
|
+
* @typedef {import('./dom').WebTransportReceiveStream} WebTransportReceiveStream
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @typedef {import('./dom').WebTransport} WebTransportInterface
|
|
8
|
+
*
|
|
9
|
+
* @implements {WebTransportInterface}
|
|
10
|
+
*/
|
|
11
|
+
export class WebTransport implements WebTransportInterface {
|
|
12
|
+
/**
|
|
13
|
+
* @param {string} url
|
|
14
|
+
* @param {import('./dom').WebTransportOptions} [args]
|
|
15
|
+
*/
|
|
16
|
+
constructor(url: string, args?: import("./dom").WebTransportOptions | undefined);
|
|
17
|
+
ready: Promise<void>;
|
|
18
|
+
closed: Promise<import("./dom").WebTransportCloseInfo>;
|
|
19
|
+
datagrams: import("./dom").WebTransportDatagramDuplexStream;
|
|
20
|
+
/** @type {ReadableStream<WebTransportBidirectionalStream>} */
|
|
21
|
+
incomingBidirectionalStreams: ReadableStream<WebTransportBidirectionalStream>;
|
|
22
|
+
/** @type {ReadableStream<WebTransportReceiveStream>} */
|
|
23
|
+
incomingUnidirectionalStreams: ReadableStream<WebTransportReceiveStream>;
|
|
24
|
+
/**
|
|
25
|
+
* @param {WebTransportCloseInfo} [closeinfo]
|
|
26
|
+
*/
|
|
27
|
+
close(closeinfo?: import("./dom").WebTransportCloseInfo | undefined): void;
|
|
28
|
+
createBidirectionalStream(): Promise<import("./dom").WebTransportBidirectionalStream>;
|
|
29
|
+
createUnidirectionalStream(): Promise<import("./dom").WebTransportSendStream>;
|
|
30
|
+
}
|
|
31
|
+
export type WebTransportCloseInfo = import('./dom').WebTransportCloseInfo;
|
|
32
|
+
export type WebTransportBidirectionalStream = import('./dom').WebTransportBidirectionalStream;
|
|
33
|
+
export type WebTransportReceiveStream = import('./dom').WebTransportReceiveStream;
|
|
34
|
+
export type WebTransportInterface = import('./dom').WebTransport;
|
|
35
|
+
//# sourceMappingURL=webtransport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webtransport.d.ts","sourceRoot":"","sources":["../../lib/webtransport.js"],"names":[],"mappings":"AAMA;;;;GAIG;AAEH;;;;GAIG;AACH;IACE;;;OAGG;IACH,iBAHW,MAAM,0DAyDhB;IAlCC,qBAA6B;IAC7B,uDAA+B;IAE/B,4DAAqC;IAErC,8DAA8D;IAC9D,8BADW,eAAe,+BAA+B,CAAC,CACiB;IAE3E,wDAAwD;IACxD,+BADW,eAAe,yBAAyB,CAAC,CAEV;IA0B5C;;OAEG;IACH,2EASC;IAED,sFASC;IAED,8EASC;CACF;oCA1GY,OAAO,OAAO,EAAE,qBAAqB;8CACrC,OAAO,OAAO,EAAE,+BAA+B;wCAC/C,OAAO,OAAO,EAAE,yBAAyB;oCAIzC,OAAO,OAAO,EAAE,YAAY"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bidirectional-streams.spec.d.ts","sourceRoot":"","sources":["../../test/bidirectional-streams.spec.js"],"names":[],"mappings":";;;0BAYa,OAAO,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datagrams.spec.d.ts","sourceRoot":"","sources":["../../test/datagrams.spec.js"],"names":[],"mappings":";;;0BAYa,OAAO,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"echoclient.d.ts","sourceRoot":"","sources":["../../test/echoclient.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"echoserver.d.ts","sourceRoot":"","sources":["../../test/echoserver.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-loop.spec.d.ts","sourceRoot":"","sources":["../../test/event-loop.spec.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {object} Certificate
|
|
3
|
+
* @property {string} public
|
|
4
|
+
* @property {string} private
|
|
5
|
+
* @property {string} cert
|
|
6
|
+
* @property {Uint8Array} hash
|
|
7
|
+
* @property {string} fingerprint
|
|
8
|
+
*
|
|
9
|
+
* @param {*} attrs
|
|
10
|
+
* @param {*} options
|
|
11
|
+
* @returns {Promise<Certificate | null>}
|
|
12
|
+
*/
|
|
13
|
+
export function generateWebTransportCertificate(attrs: any, options: any): Promise<Certificate | null>;
|
|
14
|
+
export type Certificate = {
|
|
15
|
+
public: string;
|
|
16
|
+
private: string;
|
|
17
|
+
cert: string;
|
|
18
|
+
hash: Uint8Array;
|
|
19
|
+
fingerprint: string;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=certificate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"certificate.d.ts","sourceRoot":"","sources":["../../../test/fixtures/certificate.js"],"names":[],"mappings":"AAgVA;;;;;;;;;;;GAWG;AACH,2EAFa,QAAQ,WAAW,GAAG,IAAI,CAAC,CA8GvC;;YAtHa,MAAM;aACN,MAAM;UACN,MAAM;UACN,UAAU;iBACV,MAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chai.d.ts","sourceRoot":"","sources":["../../../test/fixtures/chai.js"],"names":[],"mappings":"AAKA,uCAAiC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read a stream contents to the end and return it
|
|
3
|
+
*
|
|
4
|
+
* @template T
|
|
5
|
+
* @param {ReadableStream<T>} readable
|
|
6
|
+
* @param {number} [expected]
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export function readStream<T>(readable: ReadableStream<T>, expected?: number | undefined): Promise<T[]>;
|
|
10
|
+
//# sourceMappingURL=read-stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-stream.d.ts","sourceRoot":"","sources":["../../../test/fixtures/read-stream.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wGA2BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reader-value.d.ts","sourceRoot":"","sources":["../../../test/fixtures/reader-value.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,iFAkBC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function createServer(): Promise<{
|
|
2
|
+
server: Http3Server;
|
|
3
|
+
certificate: import("./certificate.js").Certificate;
|
|
4
|
+
}>;
|
|
5
|
+
/**
|
|
6
|
+
* @param {import('../../lib/server.js').Http3Server} server
|
|
7
|
+
* @param {string} path
|
|
8
|
+
*/
|
|
9
|
+
export function getServerSession(server: import('../../lib/server.js').Http3Server, path: string): Promise<import("../../lib/types.js").WebTransportSession>;
|
|
10
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../test/fixtures/server.js"],"names":[],"mappings":"AAGA;;;GA6BC;AAED;;;GAGG;AACH,yCAHW,OAAO,qBAAqB,EAAE,WAAW,QACzC,MAAM,6DAqBhB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Write contents to a stream and close it
|
|
3
|
+
*
|
|
4
|
+
* @template T
|
|
5
|
+
* @param {WritableStream<T>} writable
|
|
6
|
+
* @param {T[]} input
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export function writeStream<T>(writable: WritableStream<T>, input: T[]): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=write-stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-stream.d.ts","sourceRoot":"","sources":["../../../test/fixtures/write-stream.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,uFAQC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../test/test.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {import('../lib/dom').WebTransport} session
|
|
3
|
+
*/
|
|
4
|
+
export function incomingBidirectionalEchoTest(session: import('../lib/dom').WebTransport): Promise<void>;
|
|
5
|
+
/**
|
|
6
|
+
* @param {import('../lib/dom').WebTransport} session
|
|
7
|
+
*/
|
|
8
|
+
export function outgoingBidirectionalEchoTest(session: import('../lib/dom').WebTransport): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* @param {import('../lib/dom').WebTransport} session
|
|
11
|
+
*/
|
|
12
|
+
export function unidirectionalEchoTest(session: import('../lib/dom').WebTransport): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* @param {import('../lib/dom').WebTransport} session
|
|
15
|
+
*/
|
|
16
|
+
export function datagramEchoTest(session: import('../lib/dom').WebTransport): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* @param {import('../lib').Http3Server} server
|
|
19
|
+
*/
|
|
20
|
+
export function runEchoServer(server: import('../lib').Http3Server): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* @param {import('../lib/dom').WebTransport} transport
|
|
23
|
+
*/
|
|
24
|
+
export function echoTestsConnection(transport: import('../lib/dom').WebTransport): Promise<void>;
|
|
25
|
+
//# sourceMappingURL=testsuite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testsuite.d.ts","sourceRoot":"","sources":["../../test/testsuite.js"],"names":[],"mappings":"AAIA;;GAEG;AACH,uDAFW,OAAO,YAAY,EAAE,YAAY,iBAsB3C;AAED;;GAEG;AACH,uDAFW,OAAO,YAAY,EAAE,YAAY,iBAS3C;AAED;;GAEG;AACH,gDAFW,OAAO,YAAY,EAAE,YAAY,iBAuB3C;AAED;;GAEG;AACH,0CAFW,OAAO,YAAY,EAAE,YAAY,iBAQ3C;AAED;;GAEG;AACH,sCAFW,OAAO,QAAQ,EAAE,WAAW,iBAmCtC;AAcD;;GAEG;AACH,+CAFW,OAAO,YAAY,EAAE,YAAY,iBAqM3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unidirectional-streams.spec.d.ts","sourceRoot":"","sources":["../../test/unidirectional-streams.spec.js"],"names":[],"mappings":";;;0BAYa,OAAO,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC"}
|
package/lib/index.js
CHANGED
package/lib/server.js
CHANGED
|
@@ -11,6 +11,7 @@ import { defer } from './utils.js'
|
|
|
11
11
|
* @typedef {import('./types').Http3ServerEventHandler} Http3ServerEventHandler
|
|
12
12
|
* @typedef {import('./types').Http3WTServerSessionVisitorEvent} Http3WTServerSessionVisitorEvent
|
|
13
13
|
* @typedef {import('./types').ServerStatusEvent} ServerStatusEvent
|
|
14
|
+
* @typedef {import('./types').Http3ServerInit} Http3ServerInit
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -19,7 +20,7 @@ import { defer } from './utils.js'
|
|
|
19
20
|
export class Http3Server extends Http3WebTransport {
|
|
20
21
|
/**
|
|
21
22
|
*
|
|
22
|
-
* @param {
|
|
23
|
+
* @param {Http3ServerInit} args
|
|
23
24
|
*/
|
|
24
25
|
constructor(args) {
|
|
25
26
|
super(args, 'server')
|
package/lib/types.ts
CHANGED
|
@@ -171,3 +171,11 @@ export type WebTransportSessionState = 'connected' | 'closed' | 'failed'
|
|
|
171
171
|
export interface WebTransportSession extends WebTransport {
|
|
172
172
|
state: WebTransportSessionState
|
|
173
173
|
}
|
|
174
|
+
|
|
175
|
+
export interface Http3ServerInit {
|
|
176
|
+
port: number
|
|
177
|
+
host: string
|
|
178
|
+
secret: string
|
|
179
|
+
cert: string
|
|
180
|
+
privKey: string
|
|
181
|
+
}
|
package/lib/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fails-components/webtransport",
|
|
3
|
-
"version": "0.1.0-macarmbuild.
|
|
3
|
+
"version": "0.1.0-macarmbuild.6",
|
|
4
4
|
"description": "A component to add webtransport support (server and client) to node.js using libquiche",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"rebuild": "node build.js rebuild",
|
|
19
19
|
"rebuild-debug": "node build.js rebuild-debug -D",
|
|
20
20
|
"build-debug": "node build.js build-debug",
|
|
21
|
-
"types": "tsc"
|
|
21
|
+
"types": "tsc",
|
|
22
|
+
"lint": "eslint lib test"
|
|
22
23
|
},
|
|
23
24
|
"repository": {
|
|
24
25
|
"type": "git",
|
|
@@ -42,10 +43,12 @@
|
|
|
42
43
|
"@babel/core": "^7.17.10",
|
|
43
44
|
"@babel/eslint-parser": "^7.17.0",
|
|
44
45
|
"@types/chai": "^4.3.3",
|
|
46
|
+
"@types/dirty-chai": "^2.0.2",
|
|
45
47
|
"@types/mocha": "^10.0.0",
|
|
46
48
|
"@types/node": "^18.11.5",
|
|
47
49
|
"chai": "^4.3.6",
|
|
48
50
|
"cmake-js": "^6.3.2",
|
|
51
|
+
"dirty-chai": "^2.0.1",
|
|
49
52
|
"eslint": "^7.32.0",
|
|
50
53
|
"eslint-config-prettier": "^7.2.0",
|
|
51
54
|
"eslint-config-standard": "^16.0.2",
|