@moqtap/codec 0.2.3 → 0.4.0
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/LICENSE +21 -21
- package/README.md +100 -99
- package/dist/{chunk-RZHAPEXO.js → chunk-2A57DRXV.js} +36 -10
- package/dist/{chunk-73MWUKSJ.js → chunk-2UTVXWFF.js} +190 -102
- package/dist/{chunk-JTVCOMBI.cjs → chunk-3XKO6PCR.cjs} +290 -183
- package/dist/{chunk-ACQ4CUJP.cjs → chunk-4BDEU3D4.cjs} +237 -158
- package/dist/{chunk-4N4INRE7.cjs → chunk-4HBKHNU2.cjs} +144 -110
- package/dist/{chunk-2ZT6CVSE.js → chunk-4IVZZOY3.js} +269 -162
- package/dist/{chunk-GLBQDG4L.cjs → chunk-5O764MBD.cjs} +508 -117
- package/dist/chunk-7KBAWOBA.js +1212 -0
- package/dist/{chunk-JSQM2MG3.js → chunk-7QOPNSDF.js} +44 -12
- package/dist/{chunk-SYHW3FLI.cjs → chunk-7RE6KSIY.cjs} +28 -8
- package/dist/{chunk-YG5KJESI.js → chunk-AY6IAHUM.js} +28 -8
- package/dist/{chunk-EFM5T7OM.js → chunk-BLQDWOSG.js} +36 -10
- package/dist/{chunk-UYXTY6ZQ.cjs → chunk-E65QKRSN.cjs} +20 -12
- package/dist/{chunk-BISI45MN.cjs → chunk-EAHE3IOG.cjs} +44 -12
- package/dist/{chunk-PZBPH2D7.js → chunk-GCBFHZW6.js} +216 -137
- package/dist/{chunk-GXEW4COZ.cjs → chunk-H5NSL4MO.cjs} +36 -10
- package/dist/chunk-HZHSO7EW.cjs +1212 -0
- package/dist/{chunk-KZCYQ7ED.cjs → chunk-IILNSDEQ.cjs} +69 -41
- package/dist/{chunk-4XYGE53S.cjs → chunk-J3XCPBW3.cjs} +36 -10
- package/dist/{chunk-6AEHWULA.cjs → chunk-JKOEJZ5B.cjs} +28 -8
- package/dist/{chunk-RUPCJTC3.cjs → chunk-JL3NEW3O.cjs} +23 -1
- package/dist/{chunk-G7GI7LJA.js → chunk-LORZMJJB.js} +36 -10
- package/dist/{chunk-DUBCL3WF.cjs → chunk-LV5C6MEC.cjs} +36 -10
- package/dist/{chunk-ENURAVHI.cjs → chunk-MYXAD5JC.cjs} +44 -12
- package/dist/{chunk-FXZ2MYKJ.js → chunk-MZ7HUCGJ.js} +20 -12
- package/dist/{chunk-S74DWJE2.cjs → chunk-OKG2HT25.cjs} +277 -88
- package/dist/{chunk-BGWGVINJ.cjs → chunk-PKEOQSSZ.cjs} +144 -110
- package/dist/{chunk-2GODRVT5.js → chunk-Q46ZURKX.js} +325 -48
- package/dist/{chunk-UR6JKS56.js → chunk-Q7IGWV3P.js} +41 -9
- package/dist/{chunk-XSNX2IUJ.js → chunk-RW4UG7CN.js} +121 -87
- package/dist/{chunk-DWK5ZQZ4.js → chunk-RZTLQAKF.js} +28 -8
- package/dist/{chunk-UNS34PTA.cjs → chunk-S6IPIN66.cjs} +44 -12
- package/dist/{chunk-YIG2C3LF.cjs → chunk-SDWRXXOO.cjs} +214 -126
- package/dist/{chunk-CEH7ESNC.js → chunk-SHMA4PBY.js} +121 -87
- package/dist/{chunk-MC7W6PMI.js → chunk-U3ZVLT5L.js} +483 -135
- package/dist/{chunk-VJUUZ4W2.cjs → chunk-UJU63EFY.cjs} +374 -97
- package/dist/{chunk-7L43FE6P.js → chunk-VOU7PNHI.js} +23 -1
- package/dist/{chunk-E6E3NQYU.js → chunk-WRHGCVYN.js} +44 -12
- package/dist/{chunk-FPISPJ5N.cjs → chunk-XNWYLVGU.cjs} +529 -181
- package/dist/{chunk-U3IPZYPX.js → chunk-XS77RBY7.js} +228 -39
- package/dist/{chunk-JGG7CMSZ.cjs → chunk-XZE5R57R.cjs} +144 -110
- package/dist/{chunk-77MNXX3M.js → chunk-Y6KCSM3V.js} +121 -87
- package/dist/{chunk-TLYNOOQP.cjs → chunk-YTPZZI2M.cjs} +41 -9
- package/dist/{chunk-7DUBLRXC.js → chunk-YWRCSQBA.js} +44 -12
- package/dist/{chunk-MRJWLGYH.js → chunk-Z3VKP3PJ.js} +69 -41
- package/dist/{chunk-E6P74GDT.js → chunk-Z6U26IRI.js} +464 -73
- package/dist/{codec-FvGCxIhr.d.ts → codec-25u4_1HS.d.ts} +4 -4
- package/dist/{codec-DRcsBCsb.d.ts → codec-3Ppy_5Gd.d.ts} +4 -4
- package/dist/{codec-BdVMRMOI.d.ts → codec-BB0U8MF2.d.cts} +4 -4
- package/dist/{codec-B2cH-f5V.d.cts → codec-BHHfBTnV.d.ts} +4 -4
- package/dist/{codec-B5K73Bdj.d.ts → codec-BN6jk0Td.d.cts} +4 -4
- package/dist/{codec-R8GrCPt2.d.ts → codec-BU0gaSZm.d.ts} +4 -4
- package/dist/{codec-Bq-tLtfP.d.ts → codec-C-Yk2RNa.d.ts} +4 -4
- package/dist/codec-CFWQY9Lj.d.cts +18 -0
- package/dist/{codec-CPlK3Pi5.d.ts → codec-COy4uuPO.d.cts} +4 -4
- package/dist/codec-CewFCsEy.d.ts +18 -0
- package/dist/{codec-KXHvXZVb.d.cts → codec-Ck7ZwFF1.d.cts} +4 -4
- package/dist/{codec-DZhZSIii.d.cts → codec-D2QVSH9D.d.ts} +4 -4
- package/dist/{codec-BwFgpeQu.d.ts → codec-DDUBJGn0.d.cts} +4 -4
- package/dist/{codec-BFeliJFc.d.ts → codec-DNfml-se.d.ts} +4 -4
- package/dist/{codec-C4n1PS09.d.cts → codec-DoOGjjDq.d.cts} +4 -4
- package/dist/{codec-Bap882Fh.d.cts → codec-J7ekOSMc.d.ts} +4 -4
- package/dist/{codec-SKBeHQk7.d.ts → codec-R9TJCq-E.d.cts} +4 -4
- package/dist/{codec-DNUIgLqc.d.cts → codec-ZwV-Njt6.d.ts} +4 -4
- package/dist/{codec-HgBgHkFI.d.cts → codec-j819z_hL.d.cts} +4 -4
- package/dist/{codec-DY4QH364.d.cts → codec-w8z2j_uo.d.cts} +4 -4
- package/dist/{codec-CPvPq0sb.d.cts → codec-wtt6WF1K.d.ts} +4 -4
- package/dist/{codec-BUMjz0J4.d.cts → codec-z6_2PSzi.d.cts} +4 -4
- package/dist/{draft7-session.cjs → draft07-session.cjs} +2 -2
- package/dist/draft07-session.d.cts +8 -0
- package/dist/draft07-session.d.ts +8 -0
- package/dist/{draft7-session.js → draft07-session.js} +1 -1
- package/dist/draft07.cjs +129 -0
- package/dist/draft07.d.cts +67 -0
- package/dist/draft07.d.ts +67 -0
- package/dist/draft07.js +129 -0
- package/dist/draft08-session.cjs +6 -0
- package/dist/draft08-session.d.cts +8 -0
- package/dist/draft08-session.d.ts +8 -0
- package/dist/{draft8-session.js → draft08-session.js} +1 -1
- package/dist/draft08.cjs +119 -0
- package/dist/{draft8.d.cts → draft08.d.cts} +15 -13
- package/dist/{draft8.d.ts → draft08.d.ts} +15 -13
- package/dist/{draft8.js → draft08.js} +7 -4
- package/dist/draft09-session.cjs +6 -0
- package/dist/draft09-session.d.cts +8 -0
- package/dist/draft09-session.d.ts +8 -0
- package/dist/{draft9-session.js → draft09-session.js} +1 -1
- package/dist/draft09.cjs +119 -0
- package/dist/{draft9.d.cts → draft09.d.cts} +15 -13
- package/dist/{draft9.d.ts → draft09.d.ts} +15 -13
- package/dist/{draft9.js → draft09.js} +7 -4
- package/dist/draft10-session.cjs +2 -2
- package/dist/draft10-session.d.cts +6 -6
- package/dist/draft10-session.d.ts +6 -6
- package/dist/draft10-session.js +1 -1
- package/dist/draft10.cjs +8 -5
- package/dist/draft10.d.cts +14 -12
- package/dist/draft10.d.ts +14 -12
- package/dist/draft10.js +16 -13
- package/dist/draft11-session.cjs +2 -2
- package/dist/draft11-session.d.cts +6 -6
- package/dist/draft11-session.d.ts +6 -6
- package/dist/draft11-session.js +1 -1
- package/dist/draft11.cjs +8 -5
- package/dist/draft11.d.cts +14 -12
- package/dist/draft11.d.ts +14 -12
- package/dist/draft11.js +16 -13
- package/dist/draft12-session.cjs +2 -2
- package/dist/draft12-session.d.cts +6 -6
- package/dist/draft12-session.d.ts +6 -6
- package/dist/draft12-session.js +1 -1
- package/dist/draft12.cjs +8 -5
- package/dist/draft12.d.cts +16 -14
- package/dist/draft12.d.ts +16 -14
- package/dist/draft12.js +16 -13
- package/dist/draft13-session.cjs +2 -2
- package/dist/draft13-session.d.cts +6 -6
- package/dist/draft13-session.d.ts +6 -6
- package/dist/draft13-session.js +1 -1
- package/dist/draft13.cjs +8 -5
- package/dist/draft13.d.cts +16 -14
- package/dist/draft13.d.ts +16 -14
- package/dist/draft13.js +16 -13
- package/dist/draft14-session.cjs +2 -2
- package/dist/draft14-session.d.cts +6 -6
- package/dist/draft14-session.d.ts +6 -6
- package/dist/draft14-session.js +1 -1
- package/dist/draft14.cjs +14 -5
- package/dist/draft14.d.cts +14 -12
- package/dist/draft14.d.ts +14 -12
- package/dist/draft14.js +13 -4
- package/dist/draft15-session.cjs +2 -2
- package/dist/draft15-session.d.cts +6 -6
- package/dist/draft15-session.d.ts +6 -6
- package/dist/draft15-session.js +1 -1
- package/dist/draft15.cjs +8 -5
- package/dist/draft15.d.cts +14 -12
- package/dist/draft15.d.ts +14 -12
- package/dist/draft15.js +16 -13
- package/dist/draft16-session.cjs +2 -2
- package/dist/draft16-session.d.cts +6 -6
- package/dist/draft16-session.d.ts +6 -6
- package/dist/draft16-session.js +1 -1
- package/dist/draft16.cjs +8 -5
- package/dist/draft16.d.cts +14 -12
- package/dist/draft16.d.ts +14 -12
- package/dist/draft16.js +16 -13
- package/dist/draft17-session.cjs +2 -2
- package/dist/draft17-session.d.cts +7 -7
- package/dist/draft17-session.d.ts +7 -7
- package/dist/draft17-session.js +1 -1
- package/dist/draft17.cjs +8 -5
- package/dist/draft17.d.cts +11 -9
- package/dist/draft17.d.ts +11 -9
- package/dist/draft17.js +16 -13
- package/dist/index.cjs +52 -74
- package/dist/index.d.cts +41 -60
- package/dist/index.d.ts +41 -60
- package/dist/index.js +40 -62
- package/dist/{session-types-CJIFbTPd.d.ts → session-types-C7UONex5.d.cts} +28 -27
- package/dist/{session-types-Cbq8IGCP.d.cts → session-types-X-IYEGoG.d.ts} +28 -27
- package/dist/session.cjs +46 -13
- package/dist/session.d.cts +29 -11
- package/dist/session.d.ts +29 -11
- package/dist/session.js +46 -13
- package/dist/{types-DxSFvL2b.d.cts → types--Q7_DcvP.d.cts} +43 -39
- package/dist/{types-DxSFvL2b.d.ts → types--Q7_DcvP.d.ts} +43 -39
- package/dist/{types-B0FT5Qs2.d.cts → types-0IWbU9Z_.d.cts} +36 -36
- package/dist/{types-B0FT5Qs2.d.ts → types-0IWbU9Z_.d.ts} +36 -36
- package/dist/{types-gQsr0AAA.d.cts → types-B3g5G9KP.d.cts} +36 -36
- package/dist/{types-gQsr0AAA.d.ts → types-B3g5G9KP.d.ts} +36 -36
- package/dist/{types-Pme7sua0.d.cts → types-BFpFNM_m.d.cts} +57 -32
- package/dist/{types-Pme7sua0.d.ts → types-BFpFNM_m.d.ts} +57 -32
- package/dist/{types-8gUGeMgs.d.cts → types-Br7fm2mf.d.cts} +48 -26
- package/dist/{types-8gUGeMgs.d.ts → types-Br7fm2mf.d.ts} +48 -26
- package/dist/{types-BeAVNU-F.d.cts → types-C2qKTRR_.d.cts} +50 -45
- package/dist/{types-BeAVNU-F.d.ts → types-C2qKTRR_.d.ts} +50 -45
- package/dist/{types-DKpsfD3i.d.cts → types-DEaypVsD.d.cts} +115 -55
- package/dist/{types-DKpsfD3i.d.ts → types-DEaypVsD.d.ts} +115 -55
- package/dist/types-Dl4IaAHR.d.cts +282 -0
- package/dist/types-Dl4IaAHR.d.ts +282 -0
- package/dist/{types-CDa7F5ct.d.cts → types-DrQpTW1G.d.cts} +58 -50
- package/dist/{types-CDa7F5ct.d.ts → types-DrQpTW1G.d.ts} +58 -50
- package/dist/types-DuIO7cWK.d.cts +25 -0
- package/dist/types-DuIO7cWK.d.ts +25 -0
- package/dist/{types-B9A2g05r.d.cts → types-DuxfOYiO.d.cts} +47 -31
- package/dist/{types-B9A2g05r.d.ts → types-DuxfOYiO.d.ts} +47 -31
- package/dist/{types-D1dI_oTX.d.cts → types-jV1yDDBA.d.cts} +36 -36
- package/dist/{types-D1dI_oTX.d.ts → types-jV1yDDBA.d.ts} +36 -36
- package/package.json +192 -192
- package/src/core/buffer-reader.ts +130 -130
- package/src/core/buffer-writer.ts +100 -100
- package/src/core/errors.ts +1 -1
- package/src/core/hex.ts +21 -21
- package/src/core/session-types.ts +61 -59
- package/src/core/types.ts +18 -361
- package/src/drafts/draft07/codec.ts +1058 -938
- package/src/drafts/draft07/data-streams.ts +240 -240
- package/src/drafts/draft07/index.ts +124 -89
- package/src/drafts/draft07/messages.ts +76 -42
- package/src/drafts/draft07/rules.ts +107 -101
- package/src/drafts/draft07/session-fsm.ts +315 -287
- package/src/drafts/draft07/session.ts +8 -6
- package/src/drafts/draft07/types.ts +406 -72
- package/src/drafts/draft07/varint.ts +51 -51
- package/src/drafts/draft08/codec.ts +985 -953
- package/src/drafts/draft08/data-streams.ts +363 -359
- package/src/drafts/draft08/index.ts +10 -9
- package/src/drafts/draft08/messages.ts +59 -59
- package/src/drafts/draft08/rules.ts +73 -73
- package/src/drafts/draft08/session-fsm.ts +335 -303
- package/src/drafts/draft08/session.ts +6 -7
- package/src/drafts/draft08/types.ts +380 -384
- package/src/drafts/draft09/codec.ts +977 -945
- package/src/drafts/draft09/data-streams.ts +336 -332
- package/src/drafts/draft09/index.ts +10 -9
- package/src/drafts/draft09/messages.ts +59 -59
- package/src/drafts/draft09/rules.ts +73 -73
- package/src/drafts/draft09/session-fsm.ts +335 -303
- package/src/drafts/draft09/session.ts +6 -7
- package/src/drafts/draft09/types.ts +380 -384
- package/src/drafts/draft10/codec.ts +977 -945
- package/src/drafts/draft10/data-streams.ts +336 -332
- package/src/drafts/draft10/index.ts +10 -9
- package/src/drafts/draft10/messages.ts +59 -59
- package/src/drafts/draft10/rules.ts +73 -73
- package/src/drafts/draft10/session-fsm.ts +335 -303
- package/src/drafts/draft10/session.ts +6 -7
- package/src/drafts/draft10/types.ts +380 -384
- package/src/drafts/draft11/codec.ts +1054 -988
- package/src/drafts/draft11/data-streams.ts +316 -269
- package/src/drafts/draft11/index.ts +10 -9
- package/src/drafts/draft11/messages.ts +60 -59
- package/src/drafts/draft11/rules.ts +73 -73
- package/src/drafts/draft11/session-fsm.ts +359 -333
- package/src/drafts/draft11/session.ts +6 -7
- package/src/drafts/draft11/types.ts +385 -381
- package/src/drafts/draft12/codec.ts +1178 -1122
- package/src/drafts/draft12/data-streams.ts +324 -275
- package/src/drafts/draft12/index.ts +10 -9
- package/src/drafts/draft12/messages.ts +67 -66
- package/src/drafts/draft12/rules.ts +79 -79
- package/src/drafts/draft12/session-fsm.ts +384 -358
- package/src/drafts/draft12/session.ts +6 -7
- package/src/drafts/draft12/types.ts +424 -419
- package/src/drafts/draft13/codec.ts +1296 -1206
- package/src/drafts/draft13/data-streams.ts +326 -275
- package/src/drafts/draft13/index.ts +10 -9
- package/src/drafts/draft13/messages.ts +73 -68
- package/src/drafts/draft13/rules.ts +81 -81
- package/src/drafts/draft13/session-fsm.ts +392 -366
- package/src/drafts/draft13/session.ts +6 -7
- package/src/drafts/draft13/types.ts +447 -438
- package/src/drafts/draft14/codec.ts +1347 -1043
- package/src/drafts/draft14/data-streams.ts +831 -813
- package/src/drafts/draft14/index.ts +17 -9
- package/src/drafts/draft14/messages.ts +65 -65
- package/src/drafts/draft14/rules.ts +81 -81
- package/src/drafts/draft14/session-fsm.ts +415 -405
- package/src/drafts/draft14/session.ts +6 -7
- package/src/drafts/draft14/types.ts +451 -381
- package/src/drafts/draft15/codec.ts +1138 -978
- package/src/drafts/draft15/data-streams.ts +842 -794
- package/src/drafts/draft15/index.ts +10 -9
- package/src/drafts/draft15/messages.ts +54 -53
- package/src/drafts/draft15/rules.ts +67 -67
- package/src/drafts/draft15/session-fsm.ts +319 -299
- package/src/drafts/draft15/session.ts +6 -7
- package/src/drafts/draft15/types.ts +357 -339
- package/src/drafts/draft16/codec.ts +1242 -966
- package/src/drafts/draft16/data-streams.ts +835 -789
- package/src/drafts/draft16/index.ts +10 -9
- package/src/drafts/draft16/messages.ts +56 -55
- package/src/drafts/draft16/rules.ts +69 -69
- package/src/drafts/draft16/session-fsm.ts +319 -299
- package/src/drafts/draft16/session.ts +6 -7
- package/src/drafts/draft16/types.ts +386 -357
- package/src/drafts/draft17/codec.ts +1209 -971
- package/src/drafts/draft17/data-streams.ts +969 -758
- package/src/drafts/draft17/index.ts +9 -7
- package/src/drafts/draft17/messages.ts +43 -42
- package/src/drafts/draft17/rules.ts +58 -58
- package/src/drafts/draft17/session-fsm.ts +248 -216
- package/src/drafts/draft17/session.ts +5 -5
- package/src/drafts/draft17/types.ts +337 -313
- package/src/index.ts +85 -274
- package/src/session.ts +63 -25
- package/dist/chunk-FZDIEHQL.cjs +0 -1042
- package/dist/chunk-HDWJ2GDE.js +0 -24
- package/dist/chunk-KNDYS3DK.cjs +0 -24
- package/dist/chunk-N2KBF5Q2.js +0 -1042
- package/dist/draft7-session.d.cts +0 -7
- package/dist/draft7-session.d.ts +0 -7
- package/dist/draft7.cjs +0 -72
- package/dist/draft7.d.cts +0 -148
- package/dist/draft7.d.ts +0 -148
- package/dist/draft7.js +0 -72
- package/dist/draft8-session.cjs +0 -6
- package/dist/draft8-session.d.cts +0 -8
- package/dist/draft8-session.d.ts +0 -8
- package/dist/draft8.cjs +0 -116
- package/dist/draft9-session.cjs +0 -6
- package/dist/draft9-session.d.cts +0 -8
- package/dist/draft9-session.d.ts +0 -8
- package/dist/draft9.cjs +0 -116
- package/dist/types-QNXoxC9Y.d.cts +0 -236
- package/dist/types-QNXoxC9Y.d.ts +0 -236
- package/src/drafts/draft07/announce-fsm.ts +0 -2
- package/src/drafts/draft07/parameters.ts +0 -12
- package/src/drafts/draft07/subscription-fsm.ts +0 -3
package/dist/draft07.cjs
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
var _chunkHZHSO7EWcjs = require('./chunk-HZHSO7EW.cjs');
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
var _chunkMZ7VU52Ocjs = require('./chunk-MZ7VU52O.cjs');
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
var _chunkJL3NEW3Ocjs = require('./chunk-JL3NEW3O.cjs');
|
|
59
|
+
|
|
60
|
+
// src/drafts/draft07/index.ts
|
|
61
|
+
var DRAFT_VERSION = 0xff000007n;
|
|
62
|
+
var defaultCodec = _chunkHZHSO7EWcjs.createDraft07Codec.call(void 0, );
|
|
63
|
+
function encodeMessage(message) {
|
|
64
|
+
return defaultCodec.encodeMessage(message);
|
|
65
|
+
}
|
|
66
|
+
function decodeMessage(bytes) {
|
|
67
|
+
return defaultCodec.decodeMessage(bytes);
|
|
68
|
+
}
|
|
69
|
+
function createStreamDecoder() {
|
|
70
|
+
return defaultCodec.createStreamDecoder();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
exports.CLIENT_ONLY_MESSAGES = _chunkMZ7VU52Ocjs.CLIENT_ONLY_MESSAGES; exports.CONTROL_MESSAGES = _chunkMZ7VU52Ocjs.CONTROL_MESSAGES; exports.DATA_MESSAGES = _chunkMZ7VU52Ocjs.DATA_MESSAGES; exports.DRAFT_VERSION = DRAFT_VERSION; exports.DecodeError = _chunkJL3NEW3Ocjs.DecodeError; exports.MESSAGE_ID_MAP = _chunkHZHSO7EWcjs.MESSAGE_ID_MAP; exports.MESSAGE_TYPE_MAP = _chunkHZHSO7EWcjs.MESSAGE_TYPE_MAP; exports.MSG_ANNOUNCE = _chunkHZHSO7EWcjs.MSG_ANNOUNCE; exports.MSG_ANNOUNCE_CANCEL = _chunkHZHSO7EWcjs.MSG_ANNOUNCE_CANCEL; exports.MSG_ANNOUNCE_ERROR = _chunkHZHSO7EWcjs.MSG_ANNOUNCE_ERROR; exports.MSG_ANNOUNCE_OK = _chunkHZHSO7EWcjs.MSG_ANNOUNCE_OK; exports.MSG_CLIENT_SETUP = _chunkHZHSO7EWcjs.MSG_CLIENT_SETUP; exports.MSG_FETCH = _chunkHZHSO7EWcjs.MSG_FETCH; exports.MSG_FETCH_CANCEL = _chunkHZHSO7EWcjs.MSG_FETCH_CANCEL; exports.MSG_FETCH_ERROR = _chunkHZHSO7EWcjs.MSG_FETCH_ERROR; exports.MSG_FETCH_HEADER = _chunkHZHSO7EWcjs.MSG_FETCH_HEADER; exports.MSG_FETCH_OK = _chunkHZHSO7EWcjs.MSG_FETCH_OK; exports.MSG_GOAWAY = _chunkHZHSO7EWcjs.MSG_GOAWAY; exports.MSG_MAX_SUBSCRIBE_ID = _chunkHZHSO7EWcjs.MSG_MAX_SUBSCRIBE_ID; exports.MSG_OBJECT_DATAGRAM = _chunkHZHSO7EWcjs.MSG_OBJECT_DATAGRAM; exports.MSG_SERVER_SETUP = _chunkHZHSO7EWcjs.MSG_SERVER_SETUP; exports.MSG_STREAM_HEADER_SUBGROUP = _chunkHZHSO7EWcjs.MSG_STREAM_HEADER_SUBGROUP; exports.MSG_SUBSCRIBE = _chunkHZHSO7EWcjs.MSG_SUBSCRIBE; exports.MSG_SUBSCRIBE_ANNOUNCES = _chunkHZHSO7EWcjs.MSG_SUBSCRIBE_ANNOUNCES; exports.MSG_SUBSCRIBE_ANNOUNCES_ERROR = _chunkHZHSO7EWcjs.MSG_SUBSCRIBE_ANNOUNCES_ERROR; exports.MSG_SUBSCRIBE_ANNOUNCES_OK = _chunkHZHSO7EWcjs.MSG_SUBSCRIBE_ANNOUNCES_OK; exports.MSG_SUBSCRIBE_DONE = _chunkHZHSO7EWcjs.MSG_SUBSCRIBE_DONE; exports.MSG_SUBSCRIBE_ERROR = _chunkHZHSO7EWcjs.MSG_SUBSCRIBE_ERROR; exports.MSG_SUBSCRIBE_OK = _chunkHZHSO7EWcjs.MSG_SUBSCRIBE_OK; exports.MSG_SUBSCRIBE_UPDATE = _chunkHZHSO7EWcjs.MSG_SUBSCRIBE_UPDATE; exports.MSG_TRACK_STATUS = _chunkHZHSO7EWcjs.MSG_TRACK_STATUS; exports.MSG_TRACK_STATUS_REQUEST = _chunkHZHSO7EWcjs.MSG_TRACK_STATUS_REQUEST; exports.MSG_UNANNOUNCE = _chunkHZHSO7EWcjs.MSG_UNANNOUNCE; exports.MSG_UNSUBSCRIBE = _chunkHZHSO7EWcjs.MSG_UNSUBSCRIBE; exports.MSG_UNSUBSCRIBE_ANNOUNCES = _chunkHZHSO7EWcjs.MSG_UNSUBSCRIBE_ANNOUNCES; exports.PARAM_AUTHORIZATION_INFO = _chunkHZHSO7EWcjs.PARAM_AUTHORIZATION_INFO; exports.PARAM_DELIVERY_TIMEOUT = _chunkHZHSO7EWcjs.PARAM_DELIVERY_TIMEOUT; exports.PARAM_MAX_CACHE_DURATION = _chunkHZHSO7EWcjs.PARAM_MAX_CACHE_DURATION; exports.SERVER_ONLY_MESSAGES = _chunkMZ7VU52Ocjs.SERVER_ONLY_MESSAGES; exports.SETUP_PARAM_MAX_SUBSCRIBE_ID = _chunkHZHSO7EWcjs.SETUP_PARAM_MAX_SUBSCRIBE_ID; exports.SETUP_PARAM_PATH = _chunkHZHSO7EWcjs.SETUP_PARAM_PATH; exports.SETUP_PARAM_ROLE = _chunkHZHSO7EWcjs.SETUP_PARAM_ROLE; exports.createDraft07Codec = _chunkHZHSO7EWcjs.createDraft07Codec; exports.createStreamDecoder = createStreamDecoder; exports.decodeDatagram = _chunkHZHSO7EWcjs.decodeDatagram; exports.decodeFetchStream = _chunkHZHSO7EWcjs.decodeFetchStream; exports.decodeMessage = decodeMessage; exports.decodeSubgroupStream = _chunkHZHSO7EWcjs.decodeSubgroupStream; exports.decodeVarInt = _chunkHZHSO7EWcjs.decodeVarInt; exports.encodeDatagram = _chunkHZHSO7EWcjs.encodeDatagram; exports.encodeFetchStream = _chunkHZHSO7EWcjs.encodeFetchStream; exports.encodeMessage = encodeMessage; exports.encodeSubgroupStream = _chunkHZHSO7EWcjs.encodeSubgroupStream; exports.encodeVarInt = _chunkHZHSO7EWcjs.encodeVarInt; exports.getLegalIncoming = _chunkMZ7VU52Ocjs.getLegalIncoming; exports.getLegalOutgoing = _chunkMZ7VU52Ocjs.getLegalOutgoing;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { b as DecodeResult } from './types-DuIO7cWK.cjs';
|
|
2
|
+
export { D as DecodeError, a as DecodeErrorCode } from './types-DuIO7cWK.cjs';
|
|
3
|
+
export { D as Draft07Codec, c as createDraft07Codec } from './codec-CFWQY9Lj.cjs';
|
|
4
|
+
import { b as DatagramObject, F as FetchStream, S as SubgroupStream, a as Draft07MessageType, D as Draft07Message } from './types-Dl4IaAHR.cjs';
|
|
5
|
+
export { A as Announce, c as AnnounceCancel, d as AnnounceError, e as AnnounceOk, C as ClientSetup, f as DataStreamEvent, g as DataStreamHeader, h as Draft07DataStream, i as Draft07Params, j as Draft07SetupParams, k as Fetch, l as FetchCancel, m as FetchError, n as FetchObjectPayload, o as FetchOk, p as FetchStreamHeader, G as GoAway, M as MaxSubscribeId, O as ObjectDatagram, q as ObjectPayload, r as ServerSetup, s as StreamHeaderSubgroup, t as SubgroupStreamHeader, u as Subscribe, v as SubscribeAnnounces, w as SubscribeAnnouncesError, x as SubscribeAnnouncesOk, y as SubscribeDone, z as SubscribeError, B as SubscribeOk, E as SubscribeUpdate, T as TrackStatus, H as TrackStatusRequest, U as Unannounce, I as UnknownParam, J as Unsubscribe, K as UnsubscribeAnnounces } from './types-Dl4IaAHR.cjs';
|
|
6
|
+
|
|
7
|
+
declare function encodeSubgroupStream(stream: SubgroupStream): Uint8Array;
|
|
8
|
+
declare function encodeDatagram(dg: DatagramObject): Uint8Array;
|
|
9
|
+
declare function encodeFetchStream(stream: FetchStream): Uint8Array;
|
|
10
|
+
declare function decodeSubgroupStream(bytes: Uint8Array): DecodeResult<SubgroupStream>;
|
|
11
|
+
declare function decodeDatagram(bytes: Uint8Array): DecodeResult<DatagramObject>;
|
|
12
|
+
declare function decodeFetchStream(bytes: Uint8Array): DecodeResult<FetchStream>;
|
|
13
|
+
|
|
14
|
+
declare const MSG_SUBSCRIBE_UPDATE = 2n;
|
|
15
|
+
declare const MSG_SUBSCRIBE = 3n;
|
|
16
|
+
declare const MSG_SUBSCRIBE_OK = 4n;
|
|
17
|
+
declare const MSG_SUBSCRIBE_ERROR = 5n;
|
|
18
|
+
declare const MSG_ANNOUNCE = 6n;
|
|
19
|
+
declare const MSG_ANNOUNCE_OK = 7n;
|
|
20
|
+
declare const MSG_ANNOUNCE_ERROR = 8n;
|
|
21
|
+
declare const MSG_UNANNOUNCE = 9n;
|
|
22
|
+
declare const MSG_UNSUBSCRIBE = 10n;
|
|
23
|
+
declare const MSG_SUBSCRIBE_DONE = 11n;
|
|
24
|
+
declare const MSG_ANNOUNCE_CANCEL = 12n;
|
|
25
|
+
declare const MSG_TRACK_STATUS_REQUEST = 13n;
|
|
26
|
+
declare const MSG_TRACK_STATUS = 14n;
|
|
27
|
+
declare const MSG_GOAWAY = 16n;
|
|
28
|
+
declare const MSG_SUBSCRIBE_ANNOUNCES = 17n;
|
|
29
|
+
declare const MSG_SUBSCRIBE_ANNOUNCES_OK = 18n;
|
|
30
|
+
declare const MSG_SUBSCRIBE_ANNOUNCES_ERROR = 19n;
|
|
31
|
+
declare const MSG_UNSUBSCRIBE_ANNOUNCES = 20n;
|
|
32
|
+
declare const MSG_MAX_SUBSCRIBE_ID = 21n;
|
|
33
|
+
declare const MSG_FETCH = 22n;
|
|
34
|
+
declare const MSG_FETCH_CANCEL = 23n;
|
|
35
|
+
declare const MSG_FETCH_OK = 24n;
|
|
36
|
+
declare const MSG_FETCH_ERROR = 25n;
|
|
37
|
+
declare const MSG_CLIENT_SETUP = 64n;
|
|
38
|
+
declare const MSG_SERVER_SETUP = 65n;
|
|
39
|
+
declare const SETUP_PARAM_ROLE = 0n;
|
|
40
|
+
declare const SETUP_PARAM_PATH = 1n;
|
|
41
|
+
declare const SETUP_PARAM_MAX_SUBSCRIBE_ID = 2n;
|
|
42
|
+
declare const PARAM_AUTHORIZATION_INFO = 2n;
|
|
43
|
+
declare const PARAM_DELIVERY_TIMEOUT = 3n;
|
|
44
|
+
declare const PARAM_MAX_CACHE_DURATION = 4n;
|
|
45
|
+
declare const MSG_OBJECT_DATAGRAM = 1n;
|
|
46
|
+
declare const MSG_STREAM_HEADER_SUBGROUP = 4n;
|
|
47
|
+
declare const MSG_FETCH_HEADER = 5n;
|
|
48
|
+
declare const MESSAGE_TYPE_MAP: ReadonlyMap<bigint, string>;
|
|
49
|
+
declare const MESSAGE_ID_MAP: ReadonlyMap<string, bigint>;
|
|
50
|
+
|
|
51
|
+
declare const CONTROL_MESSAGES: ReadonlySet<Draft07MessageType>;
|
|
52
|
+
declare const DATA_MESSAGES: ReadonlySet<Draft07MessageType>;
|
|
53
|
+
declare const CLIENT_ONLY_MESSAGES: ReadonlySet<Draft07MessageType>;
|
|
54
|
+
declare const SERVER_ONLY_MESSAGES: ReadonlySet<Draft07MessageType>;
|
|
55
|
+
declare function getLegalOutgoing(phase: string, role: 'client' | 'server'): Set<Draft07MessageType>;
|
|
56
|
+
declare function getLegalIncoming(phase: string, role: 'client' | 'server'): Set<Draft07MessageType>;
|
|
57
|
+
|
|
58
|
+
declare function encodeVarInt(value: number | bigint): Uint8Array;
|
|
59
|
+
declare function decodeVarInt(bytes: Uint8Array, offset?: number): DecodeResult<bigint>;
|
|
60
|
+
|
|
61
|
+
declare const DRAFT_VERSION = 4278190087n;
|
|
62
|
+
|
|
63
|
+
declare function encodeMessage(message: Draft07Message): Uint8Array;
|
|
64
|
+
declare function decodeMessage(bytes: Uint8Array): DecodeResult<Draft07Message>;
|
|
65
|
+
declare function createStreamDecoder(): TransformStream<Uint8Array, Draft07Message>;
|
|
66
|
+
|
|
67
|
+
export { CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DATA_MESSAGES, DRAFT_VERSION, DecodeResult, DatagramObject as Draft07DatagramObject, Draft07Message, Draft07MessageType, FetchStream, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_ANNOUNCE, MSG_ANNOUNCE_CANCEL, MSG_ANNOUNCE_ERROR, MSG_ANNOUNCE_OK, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_HEADER, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_SUBSCRIBE_ID, MSG_OBJECT_DATAGRAM, MSG_SERVER_SETUP, MSG_STREAM_HEADER_SUBGROUP, MSG_SUBSCRIBE, MSG_SUBSCRIBE_ANNOUNCES, MSG_SUBSCRIBE_ANNOUNCES_ERROR, MSG_SUBSCRIBE_ANNOUNCES_OK, MSG_SUBSCRIBE_DONE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_REQUEST, MSG_UNANNOUNCE, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_ANNOUNCES, PARAM_AUTHORIZATION_INFO, PARAM_DELIVERY_TIMEOUT, PARAM_MAX_CACHE_DURATION, SERVER_ONLY_MESSAGES, SETUP_PARAM_MAX_SUBSCRIBE_ID, SETUP_PARAM_PATH, SETUP_PARAM_ROLE, SubgroupStream, createStreamDecoder, decodeDatagram, decodeFetchStream, decodeMessage, decodeSubgroupStream, decodeVarInt, encodeDatagram, encodeFetchStream, encodeMessage, encodeSubgroupStream, encodeVarInt, getLegalIncoming, getLegalOutgoing };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { b as DecodeResult } from './types-DuIO7cWK.js';
|
|
2
|
+
export { D as DecodeError, a as DecodeErrorCode } from './types-DuIO7cWK.js';
|
|
3
|
+
export { D as Draft07Codec, c as createDraft07Codec } from './codec-CewFCsEy.js';
|
|
4
|
+
import { b as DatagramObject, F as FetchStream, S as SubgroupStream, a as Draft07MessageType, D as Draft07Message } from './types-Dl4IaAHR.js';
|
|
5
|
+
export { A as Announce, c as AnnounceCancel, d as AnnounceError, e as AnnounceOk, C as ClientSetup, f as DataStreamEvent, g as DataStreamHeader, h as Draft07DataStream, i as Draft07Params, j as Draft07SetupParams, k as Fetch, l as FetchCancel, m as FetchError, n as FetchObjectPayload, o as FetchOk, p as FetchStreamHeader, G as GoAway, M as MaxSubscribeId, O as ObjectDatagram, q as ObjectPayload, r as ServerSetup, s as StreamHeaderSubgroup, t as SubgroupStreamHeader, u as Subscribe, v as SubscribeAnnounces, w as SubscribeAnnouncesError, x as SubscribeAnnouncesOk, y as SubscribeDone, z as SubscribeError, B as SubscribeOk, E as SubscribeUpdate, T as TrackStatus, H as TrackStatusRequest, U as Unannounce, I as UnknownParam, J as Unsubscribe, K as UnsubscribeAnnounces } from './types-Dl4IaAHR.js';
|
|
6
|
+
|
|
7
|
+
declare function encodeSubgroupStream(stream: SubgroupStream): Uint8Array;
|
|
8
|
+
declare function encodeDatagram(dg: DatagramObject): Uint8Array;
|
|
9
|
+
declare function encodeFetchStream(stream: FetchStream): Uint8Array;
|
|
10
|
+
declare function decodeSubgroupStream(bytes: Uint8Array): DecodeResult<SubgroupStream>;
|
|
11
|
+
declare function decodeDatagram(bytes: Uint8Array): DecodeResult<DatagramObject>;
|
|
12
|
+
declare function decodeFetchStream(bytes: Uint8Array): DecodeResult<FetchStream>;
|
|
13
|
+
|
|
14
|
+
declare const MSG_SUBSCRIBE_UPDATE = 2n;
|
|
15
|
+
declare const MSG_SUBSCRIBE = 3n;
|
|
16
|
+
declare const MSG_SUBSCRIBE_OK = 4n;
|
|
17
|
+
declare const MSG_SUBSCRIBE_ERROR = 5n;
|
|
18
|
+
declare const MSG_ANNOUNCE = 6n;
|
|
19
|
+
declare const MSG_ANNOUNCE_OK = 7n;
|
|
20
|
+
declare const MSG_ANNOUNCE_ERROR = 8n;
|
|
21
|
+
declare const MSG_UNANNOUNCE = 9n;
|
|
22
|
+
declare const MSG_UNSUBSCRIBE = 10n;
|
|
23
|
+
declare const MSG_SUBSCRIBE_DONE = 11n;
|
|
24
|
+
declare const MSG_ANNOUNCE_CANCEL = 12n;
|
|
25
|
+
declare const MSG_TRACK_STATUS_REQUEST = 13n;
|
|
26
|
+
declare const MSG_TRACK_STATUS = 14n;
|
|
27
|
+
declare const MSG_GOAWAY = 16n;
|
|
28
|
+
declare const MSG_SUBSCRIBE_ANNOUNCES = 17n;
|
|
29
|
+
declare const MSG_SUBSCRIBE_ANNOUNCES_OK = 18n;
|
|
30
|
+
declare const MSG_SUBSCRIBE_ANNOUNCES_ERROR = 19n;
|
|
31
|
+
declare const MSG_UNSUBSCRIBE_ANNOUNCES = 20n;
|
|
32
|
+
declare const MSG_MAX_SUBSCRIBE_ID = 21n;
|
|
33
|
+
declare const MSG_FETCH = 22n;
|
|
34
|
+
declare const MSG_FETCH_CANCEL = 23n;
|
|
35
|
+
declare const MSG_FETCH_OK = 24n;
|
|
36
|
+
declare const MSG_FETCH_ERROR = 25n;
|
|
37
|
+
declare const MSG_CLIENT_SETUP = 64n;
|
|
38
|
+
declare const MSG_SERVER_SETUP = 65n;
|
|
39
|
+
declare const SETUP_PARAM_ROLE = 0n;
|
|
40
|
+
declare const SETUP_PARAM_PATH = 1n;
|
|
41
|
+
declare const SETUP_PARAM_MAX_SUBSCRIBE_ID = 2n;
|
|
42
|
+
declare const PARAM_AUTHORIZATION_INFO = 2n;
|
|
43
|
+
declare const PARAM_DELIVERY_TIMEOUT = 3n;
|
|
44
|
+
declare const PARAM_MAX_CACHE_DURATION = 4n;
|
|
45
|
+
declare const MSG_OBJECT_DATAGRAM = 1n;
|
|
46
|
+
declare const MSG_STREAM_HEADER_SUBGROUP = 4n;
|
|
47
|
+
declare const MSG_FETCH_HEADER = 5n;
|
|
48
|
+
declare const MESSAGE_TYPE_MAP: ReadonlyMap<bigint, string>;
|
|
49
|
+
declare const MESSAGE_ID_MAP: ReadonlyMap<string, bigint>;
|
|
50
|
+
|
|
51
|
+
declare const CONTROL_MESSAGES: ReadonlySet<Draft07MessageType>;
|
|
52
|
+
declare const DATA_MESSAGES: ReadonlySet<Draft07MessageType>;
|
|
53
|
+
declare const CLIENT_ONLY_MESSAGES: ReadonlySet<Draft07MessageType>;
|
|
54
|
+
declare const SERVER_ONLY_MESSAGES: ReadonlySet<Draft07MessageType>;
|
|
55
|
+
declare function getLegalOutgoing(phase: string, role: 'client' | 'server'): Set<Draft07MessageType>;
|
|
56
|
+
declare function getLegalIncoming(phase: string, role: 'client' | 'server'): Set<Draft07MessageType>;
|
|
57
|
+
|
|
58
|
+
declare function encodeVarInt(value: number | bigint): Uint8Array;
|
|
59
|
+
declare function decodeVarInt(bytes: Uint8Array, offset?: number): DecodeResult<bigint>;
|
|
60
|
+
|
|
61
|
+
declare const DRAFT_VERSION = 4278190087n;
|
|
62
|
+
|
|
63
|
+
declare function encodeMessage(message: Draft07Message): Uint8Array;
|
|
64
|
+
declare function decodeMessage(bytes: Uint8Array): DecodeResult<Draft07Message>;
|
|
65
|
+
declare function createStreamDecoder(): TransformStream<Uint8Array, Draft07Message>;
|
|
66
|
+
|
|
67
|
+
export { CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DATA_MESSAGES, DRAFT_VERSION, DecodeResult, DatagramObject as Draft07DatagramObject, Draft07Message, Draft07MessageType, FetchStream, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_ANNOUNCE, MSG_ANNOUNCE_CANCEL, MSG_ANNOUNCE_ERROR, MSG_ANNOUNCE_OK, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_HEADER, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_SUBSCRIBE_ID, MSG_OBJECT_DATAGRAM, MSG_SERVER_SETUP, MSG_STREAM_HEADER_SUBGROUP, MSG_SUBSCRIBE, MSG_SUBSCRIBE_ANNOUNCES, MSG_SUBSCRIBE_ANNOUNCES_ERROR, MSG_SUBSCRIBE_ANNOUNCES_OK, MSG_SUBSCRIBE_DONE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_REQUEST, MSG_UNANNOUNCE, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_ANNOUNCES, PARAM_AUTHORIZATION_INFO, PARAM_DELIVERY_TIMEOUT, PARAM_MAX_CACHE_DURATION, SERVER_ONLY_MESSAGES, SETUP_PARAM_MAX_SUBSCRIBE_ID, SETUP_PARAM_PATH, SETUP_PARAM_ROLE, SubgroupStream, createStreamDecoder, decodeDatagram, decodeFetchStream, decodeMessage, decodeSubgroupStream, decodeVarInt, encodeDatagram, encodeFetchStream, encodeMessage, encodeSubgroupStream, encodeVarInt, getLegalIncoming, getLegalOutgoing };
|
package/dist/draft07.js
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MESSAGE_ID_MAP,
|
|
3
|
+
MESSAGE_TYPE_MAP,
|
|
4
|
+
MSG_ANNOUNCE,
|
|
5
|
+
MSG_ANNOUNCE_CANCEL,
|
|
6
|
+
MSG_ANNOUNCE_ERROR,
|
|
7
|
+
MSG_ANNOUNCE_OK,
|
|
8
|
+
MSG_CLIENT_SETUP,
|
|
9
|
+
MSG_FETCH,
|
|
10
|
+
MSG_FETCH_CANCEL,
|
|
11
|
+
MSG_FETCH_ERROR,
|
|
12
|
+
MSG_FETCH_HEADER,
|
|
13
|
+
MSG_FETCH_OK,
|
|
14
|
+
MSG_GOAWAY,
|
|
15
|
+
MSG_MAX_SUBSCRIBE_ID,
|
|
16
|
+
MSG_OBJECT_DATAGRAM,
|
|
17
|
+
MSG_SERVER_SETUP,
|
|
18
|
+
MSG_STREAM_HEADER_SUBGROUP,
|
|
19
|
+
MSG_SUBSCRIBE,
|
|
20
|
+
MSG_SUBSCRIBE_ANNOUNCES,
|
|
21
|
+
MSG_SUBSCRIBE_ANNOUNCES_ERROR,
|
|
22
|
+
MSG_SUBSCRIBE_ANNOUNCES_OK,
|
|
23
|
+
MSG_SUBSCRIBE_DONE,
|
|
24
|
+
MSG_SUBSCRIBE_ERROR,
|
|
25
|
+
MSG_SUBSCRIBE_OK,
|
|
26
|
+
MSG_SUBSCRIBE_UPDATE,
|
|
27
|
+
MSG_TRACK_STATUS,
|
|
28
|
+
MSG_TRACK_STATUS_REQUEST,
|
|
29
|
+
MSG_UNANNOUNCE,
|
|
30
|
+
MSG_UNSUBSCRIBE,
|
|
31
|
+
MSG_UNSUBSCRIBE_ANNOUNCES,
|
|
32
|
+
PARAM_AUTHORIZATION_INFO,
|
|
33
|
+
PARAM_DELIVERY_TIMEOUT,
|
|
34
|
+
PARAM_MAX_CACHE_DURATION,
|
|
35
|
+
SETUP_PARAM_MAX_SUBSCRIBE_ID,
|
|
36
|
+
SETUP_PARAM_PATH,
|
|
37
|
+
SETUP_PARAM_ROLE,
|
|
38
|
+
createDraft07Codec,
|
|
39
|
+
decodeDatagram,
|
|
40
|
+
decodeFetchStream,
|
|
41
|
+
decodeSubgroupStream,
|
|
42
|
+
decodeVarInt,
|
|
43
|
+
encodeDatagram,
|
|
44
|
+
encodeFetchStream,
|
|
45
|
+
encodeSubgroupStream,
|
|
46
|
+
encodeVarInt
|
|
47
|
+
} from "./chunk-7KBAWOBA.js";
|
|
48
|
+
import {
|
|
49
|
+
CLIENT_ONLY_MESSAGES,
|
|
50
|
+
CONTROL_MESSAGES,
|
|
51
|
+
DATA_MESSAGES,
|
|
52
|
+
SERVER_ONLY_MESSAGES,
|
|
53
|
+
getLegalIncoming,
|
|
54
|
+
getLegalOutgoing
|
|
55
|
+
} from "./chunk-C6KUWLQC.js";
|
|
56
|
+
import {
|
|
57
|
+
DecodeError
|
|
58
|
+
} from "./chunk-VOU7PNHI.js";
|
|
59
|
+
|
|
60
|
+
// src/drafts/draft07/index.ts
|
|
61
|
+
var DRAFT_VERSION = 0xff000007n;
|
|
62
|
+
var defaultCodec = createDraft07Codec();
|
|
63
|
+
function encodeMessage(message) {
|
|
64
|
+
return defaultCodec.encodeMessage(message);
|
|
65
|
+
}
|
|
66
|
+
function decodeMessage(bytes) {
|
|
67
|
+
return defaultCodec.decodeMessage(bytes);
|
|
68
|
+
}
|
|
69
|
+
function createStreamDecoder() {
|
|
70
|
+
return defaultCodec.createStreamDecoder();
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
CLIENT_ONLY_MESSAGES,
|
|
74
|
+
CONTROL_MESSAGES,
|
|
75
|
+
DATA_MESSAGES,
|
|
76
|
+
DRAFT_VERSION,
|
|
77
|
+
DecodeError,
|
|
78
|
+
MESSAGE_ID_MAP,
|
|
79
|
+
MESSAGE_TYPE_MAP,
|
|
80
|
+
MSG_ANNOUNCE,
|
|
81
|
+
MSG_ANNOUNCE_CANCEL,
|
|
82
|
+
MSG_ANNOUNCE_ERROR,
|
|
83
|
+
MSG_ANNOUNCE_OK,
|
|
84
|
+
MSG_CLIENT_SETUP,
|
|
85
|
+
MSG_FETCH,
|
|
86
|
+
MSG_FETCH_CANCEL,
|
|
87
|
+
MSG_FETCH_ERROR,
|
|
88
|
+
MSG_FETCH_HEADER,
|
|
89
|
+
MSG_FETCH_OK,
|
|
90
|
+
MSG_GOAWAY,
|
|
91
|
+
MSG_MAX_SUBSCRIBE_ID,
|
|
92
|
+
MSG_OBJECT_DATAGRAM,
|
|
93
|
+
MSG_SERVER_SETUP,
|
|
94
|
+
MSG_STREAM_HEADER_SUBGROUP,
|
|
95
|
+
MSG_SUBSCRIBE,
|
|
96
|
+
MSG_SUBSCRIBE_ANNOUNCES,
|
|
97
|
+
MSG_SUBSCRIBE_ANNOUNCES_ERROR,
|
|
98
|
+
MSG_SUBSCRIBE_ANNOUNCES_OK,
|
|
99
|
+
MSG_SUBSCRIBE_DONE,
|
|
100
|
+
MSG_SUBSCRIBE_ERROR,
|
|
101
|
+
MSG_SUBSCRIBE_OK,
|
|
102
|
+
MSG_SUBSCRIBE_UPDATE,
|
|
103
|
+
MSG_TRACK_STATUS,
|
|
104
|
+
MSG_TRACK_STATUS_REQUEST,
|
|
105
|
+
MSG_UNANNOUNCE,
|
|
106
|
+
MSG_UNSUBSCRIBE,
|
|
107
|
+
MSG_UNSUBSCRIBE_ANNOUNCES,
|
|
108
|
+
PARAM_AUTHORIZATION_INFO,
|
|
109
|
+
PARAM_DELIVERY_TIMEOUT,
|
|
110
|
+
PARAM_MAX_CACHE_DURATION,
|
|
111
|
+
SERVER_ONLY_MESSAGES,
|
|
112
|
+
SETUP_PARAM_MAX_SUBSCRIBE_ID,
|
|
113
|
+
SETUP_PARAM_PATH,
|
|
114
|
+
SETUP_PARAM_ROLE,
|
|
115
|
+
createDraft07Codec,
|
|
116
|
+
createStreamDecoder,
|
|
117
|
+
decodeDatagram,
|
|
118
|
+
decodeFetchStream,
|
|
119
|
+
decodeMessage,
|
|
120
|
+
decodeSubgroupStream,
|
|
121
|
+
decodeVarInt,
|
|
122
|
+
encodeDatagram,
|
|
123
|
+
encodeFetchStream,
|
|
124
|
+
encodeMessage,
|
|
125
|
+
encodeSubgroupStream,
|
|
126
|
+
encodeVarInt,
|
|
127
|
+
getLegalIncoming,
|
|
128
|
+
getLegalOutgoing
|
|
129
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { k as SessionStateOptionsRole, a as SessionState } from './session-types-C7UONex5.cjs';
|
|
2
|
+
export { A as AnnouncePhase, b as AnnounceState, F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-C7UONex5.cjs';
|
|
3
|
+
import { D as Draft08Message, a as Draft08MessageType } from './types-jV1yDDBA.cjs';
|
|
4
|
+
import './types-DuIO7cWK.cjs';
|
|
5
|
+
|
|
6
|
+
declare function createDraft08SessionState(role: SessionStateOptionsRole): SessionState<Draft08Message, Draft08MessageType>;
|
|
7
|
+
|
|
8
|
+
export { SessionState, createDraft08SessionState };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { k as SessionStateOptionsRole, a as SessionState } from './session-types-X-IYEGoG.js';
|
|
2
|
+
export { A as AnnouncePhase, b as AnnounceState, F as FetchPhase, c as FetchState, P as ProtocolViolation, d as ProtocolViolationCode, g as SessionPhase, h as SideEffect, i as SubscriptionPhase, j as SubscriptionState, T as TransitionResult, V as ValidationResult } from './session-types-X-IYEGoG.js';
|
|
3
|
+
import { D as Draft08Message, a as Draft08MessageType } from './types-jV1yDDBA.js';
|
|
4
|
+
import './types-DuIO7cWK.js';
|
|
5
|
+
|
|
6
|
+
declare function createDraft08SessionState(role: SessionStateOptionsRole): SessionState<Draft08Message, Draft08MessageType>;
|
|
7
|
+
|
|
8
|
+
export { SessionState, createDraft08SessionState };
|
package/dist/draft08.cjs
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
var _chunkXZE5R57Rcjs = require('./chunk-XZE5R57R.cjs');
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
var _chunkMYXAD5JCcjs = require('./chunk-MYXAD5JC.cjs');
|
|
59
|
+
require('./chunk-JL3NEW3O.cjs');
|
|
60
|
+
|
|
61
|
+
// src/drafts/draft08/index.ts
|
|
62
|
+
var DRAFT_VERSION = 0xff000008n;
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
exports.BIDIRECTIONAL_MESSAGES = _chunkMYXAD5JCcjs.BIDIRECTIONAL_MESSAGES; exports.CLIENT_ONLY_MESSAGES = _chunkMYXAD5JCcjs.CLIENT_ONLY_MESSAGES; exports.CONTROL_MESSAGES = _chunkMYXAD5JCcjs.CONTROL_MESSAGES; exports.DRAFT_VERSION = DRAFT_VERSION; exports.Draft08SessionFSM = _chunkMYXAD5JCcjs.Draft08SessionFSM; exports.MESSAGE_ID_MAP = _chunkXZE5R57Rcjs.MESSAGE_ID_MAP; exports.MESSAGE_TYPE_MAP = _chunkXZE5R57Rcjs.MESSAGE_TYPE_MAP; exports.MSG_ANNOUNCE = _chunkXZE5R57Rcjs.MSG_ANNOUNCE; exports.MSG_ANNOUNCE_CANCEL = _chunkXZE5R57Rcjs.MSG_ANNOUNCE_CANCEL; exports.MSG_ANNOUNCE_ERROR = _chunkXZE5R57Rcjs.MSG_ANNOUNCE_ERROR; exports.MSG_ANNOUNCE_OK = _chunkXZE5R57Rcjs.MSG_ANNOUNCE_OK; exports.MSG_CLIENT_SETUP = _chunkXZE5R57Rcjs.MSG_CLIENT_SETUP; exports.MSG_FETCH = _chunkXZE5R57Rcjs.MSG_FETCH; exports.MSG_FETCH_CANCEL = _chunkXZE5R57Rcjs.MSG_FETCH_CANCEL; exports.MSG_FETCH_ERROR = _chunkXZE5R57Rcjs.MSG_FETCH_ERROR; exports.MSG_FETCH_OK = _chunkXZE5R57Rcjs.MSG_FETCH_OK; exports.MSG_GOAWAY = _chunkXZE5R57Rcjs.MSG_GOAWAY; exports.MSG_MAX_SUBSCRIBE_ID = _chunkXZE5R57Rcjs.MSG_MAX_SUBSCRIBE_ID; exports.MSG_SERVER_SETUP = _chunkXZE5R57Rcjs.MSG_SERVER_SETUP; exports.MSG_SUBSCRIBE = _chunkXZE5R57Rcjs.MSG_SUBSCRIBE; exports.MSG_SUBSCRIBES_BLOCKED = _chunkXZE5R57Rcjs.MSG_SUBSCRIBES_BLOCKED; exports.MSG_SUBSCRIBE_ANNOUNCES = _chunkXZE5R57Rcjs.MSG_SUBSCRIBE_ANNOUNCES; exports.MSG_SUBSCRIBE_ANNOUNCES_ERROR = _chunkXZE5R57Rcjs.MSG_SUBSCRIBE_ANNOUNCES_ERROR; exports.MSG_SUBSCRIBE_ANNOUNCES_OK = _chunkXZE5R57Rcjs.MSG_SUBSCRIBE_ANNOUNCES_OK; exports.MSG_SUBSCRIBE_DONE = _chunkXZE5R57Rcjs.MSG_SUBSCRIBE_DONE; exports.MSG_SUBSCRIBE_ERROR = _chunkXZE5R57Rcjs.MSG_SUBSCRIBE_ERROR; exports.MSG_SUBSCRIBE_OK = _chunkXZE5R57Rcjs.MSG_SUBSCRIBE_OK; exports.MSG_SUBSCRIBE_UPDATE = _chunkXZE5R57Rcjs.MSG_SUBSCRIBE_UPDATE; exports.MSG_TRACK_STATUS = _chunkXZE5R57Rcjs.MSG_TRACK_STATUS; exports.MSG_TRACK_STATUS_REQUEST = _chunkXZE5R57Rcjs.MSG_TRACK_STATUS_REQUEST; exports.MSG_UNANNOUNCE = _chunkXZE5R57Rcjs.MSG_UNANNOUNCE; exports.MSG_UNSUBSCRIBE = _chunkXZE5R57Rcjs.MSG_UNSUBSCRIBE; exports.MSG_UNSUBSCRIBE_ANNOUNCES = _chunkXZE5R57Rcjs.MSG_UNSUBSCRIBE_ANNOUNCES; exports.PARAM_AUTHORIZATION_INFO = _chunkXZE5R57Rcjs.PARAM_AUTHORIZATION_INFO; exports.PARAM_DELIVERY_TIMEOUT = _chunkXZE5R57Rcjs.PARAM_DELIVERY_TIMEOUT; exports.PARAM_MAX_CACHE_DURATION = _chunkXZE5R57Rcjs.PARAM_MAX_CACHE_DURATION; exports.SERVER_ONLY_MESSAGES = _chunkMYXAD5JCcjs.SERVER_ONLY_MESSAGES; exports.SETUP_PARAM_MAX_SUBSCRIBE_ID = _chunkXZE5R57Rcjs.SETUP_PARAM_MAX_SUBSCRIBE_ID; exports.SETUP_PARAM_PATH = _chunkXZE5R57Rcjs.SETUP_PARAM_PATH; exports.createDraft08Codec = _chunkXZE5R57Rcjs.createDraft08Codec; exports.createDraft08SessionState = _chunkMYXAD5JCcjs.createDraft08SessionState; exports.createStreamDecoder = _chunkXZE5R57Rcjs.createStreamDecoder; exports.decodeDataStream = _chunkXZE5R57Rcjs.decodeDataStream; exports.decodeDatagram = _chunkXZE5R57Rcjs.decodeDatagram; exports.decodeDatagramStatus = _chunkXZE5R57Rcjs.decodeDatagramStatus; exports.decodeFetchStream = _chunkXZE5R57Rcjs.decodeFetchStream; exports.decodeMessage = _chunkXZE5R57Rcjs.decodeMessage; exports.decodeSubgroupStream = _chunkXZE5R57Rcjs.decodeSubgroupStream; exports.encodeDatagram = _chunkXZE5R57Rcjs.encodeDatagram; exports.encodeDatagramStatus = _chunkXZE5R57Rcjs.encodeDatagramStatus; exports.encodeFetchStream = _chunkXZE5R57Rcjs.encodeFetchStream; exports.encodeMessage = _chunkXZE5R57Rcjs.encodeMessage; exports.encodeSubgroupStream = _chunkXZE5R57Rcjs.encodeSubgroupStream; exports.getLegalIncoming = _chunkMYXAD5JCcjs.getLegalIncoming; exports.getLegalOutgoing = _chunkMYXAD5JCcjs.getLegalOutgoing;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { D as Draft08Codec, c as createDraft08Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
export { createDraft08SessionState } from './
|
|
5
|
-
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-
|
|
6
|
-
export { A as AnnouncePhase, F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, a as SessionState,
|
|
7
|
-
import {
|
|
1
|
+
export { D as Draft08Codec, c as createDraft08Codec, a as createStreamDecoder, d as decodeMessage, e as encodeMessage } from './codec-R9TJCq-E.cjs';
|
|
2
|
+
import { b as Draft08DataStream, c as DatagramObject, d as DatagramStatusObject, F as FetchStream, S as SubgroupStream, a as Draft08MessageType, D as Draft08Message } from './types-jV1yDDBA.cjs';
|
|
3
|
+
export { e as DataStreamEvent, f as DataStreamHeader, g as Draft08Announce, h as Draft08AnnounceCancel, i as Draft08AnnounceError, j as Draft08AnnounceOk, k as Draft08BaseMessage, l as Draft08ClientSetup, m as Draft08Fetch, n as Draft08FetchCancel, o as Draft08FetchError, p as Draft08FetchOk, q as Draft08GoAway, r as Draft08MaxSubscribeId, s as Draft08Params, t as Draft08ServerSetup, u as Draft08SetupParams, v as Draft08Subscribe, w as Draft08SubscribeAnnounces, x as Draft08SubscribeAnnouncesError, y as Draft08SubscribeAnnouncesOk, z as Draft08SubscribeDone, A as Draft08SubscribeError, B as Draft08SubscribeOk, C as Draft08SubscribeUpdate, E as Draft08SubscribesBlocked, G as Draft08TrackStatus, H as Draft08TrackStatusRequest, I as Draft08Unannounce, J as Draft08Unsubscribe, K as Draft08UnsubscribeAnnounces, L as FetchObjectPayload, M as FetchStreamHeader, N as JoiningFetch, O as ObjectPayload, P as StandaloneFetch, Q as SubgroupStreamHeader, U as UnknownParam } from './types-jV1yDDBA.cjs';
|
|
4
|
+
export { createDraft08SessionState } from './draft08-session.cjs';
|
|
5
|
+
import { g as SessionPhase, j as SubscriptionState, b as AnnounceState, c as FetchState, V as ValidationResult, T as TransitionResult } from './session-types-C7UONex5.cjs';
|
|
6
|
+
export { A as AnnouncePhase, F as FetchPhase, P as ProtocolViolation, d as ProtocolViolationCode, a as SessionState, h as SideEffect, i as SubscriptionPhase } from './session-types-C7UONex5.cjs';
|
|
7
|
+
import { b as DecodeResult } from './types-DuIO7cWK.cjs';
|
|
8
8
|
|
|
9
9
|
declare function encodeSubgroupStream(stream: SubgroupStream): Uint8Array;
|
|
10
10
|
declare function encodeDatagram(dg: DatagramObject): Uint8Array;
|
|
@@ -14,7 +14,7 @@ declare function decodeSubgroupStream(bytes: Uint8Array): DecodeResult<SubgroupS
|
|
|
14
14
|
declare function decodeDatagram(bytes: Uint8Array): DecodeResult<DatagramObject>;
|
|
15
15
|
declare function decodeDatagramStatus(bytes: Uint8Array): DecodeResult<DatagramStatusObject>;
|
|
16
16
|
declare function decodeFetchStream(bytes: Uint8Array): DecodeResult<FetchStream>;
|
|
17
|
-
declare function decodeDataStream(streamType:
|
|
17
|
+
declare function decodeDataStream(streamType: 'subgroup' | 'datagram' | 'datagram_status' | 'fetch', bytes: Uint8Array): DecodeResult<Draft08DataStream>;
|
|
18
18
|
|
|
19
19
|
declare const MSG_SUBSCRIBE_UPDATE = 2n;
|
|
20
20
|
declare const MSG_SUBSCRIBE = 3n;
|
|
@@ -54,8 +54,8 @@ declare const CONTROL_MESSAGES: ReadonlySet<Draft08MessageType>;
|
|
|
54
54
|
declare const CLIENT_ONLY_MESSAGES: ReadonlySet<Draft08MessageType>;
|
|
55
55
|
declare const SERVER_ONLY_MESSAGES: ReadonlySet<Draft08MessageType>;
|
|
56
56
|
declare const BIDIRECTIONAL_MESSAGES: ReadonlySet<Draft08MessageType>;
|
|
57
|
-
declare function getLegalOutgoing(phase: string, role:
|
|
58
|
-
declare function getLegalIncoming(phase: string, role:
|
|
57
|
+
declare function getLegalOutgoing(phase: string, role: 'client' | 'server'): Set<Draft08MessageType>;
|
|
58
|
+
declare function getLegalIncoming(phase: string, role: 'client' | 'server'): Set<Draft08MessageType>;
|
|
59
59
|
|
|
60
60
|
declare class Draft08SessionFSM {
|
|
61
61
|
private _phase;
|
|
@@ -64,9 +64,9 @@ declare class Draft08SessionFSM {
|
|
|
64
64
|
private _announces;
|
|
65
65
|
private _fetches;
|
|
66
66
|
private _subscribeIds;
|
|
67
|
-
constructor(role:
|
|
67
|
+
constructor(role: 'client' | 'server');
|
|
68
68
|
get phase(): SessionPhase;
|
|
69
|
-
get role():
|
|
69
|
+
get role(): 'client' | 'server';
|
|
70
70
|
get subscriptions(): ReadonlyMap<bigint, SubscriptionState>;
|
|
71
71
|
get announces(): ReadonlyMap<string, AnnounceState>;
|
|
72
72
|
get fetches(): ReadonlyMap<bigint, FetchState>;
|
|
@@ -102,4 +102,6 @@ declare class Draft08SessionFSM {
|
|
|
102
102
|
reset(): void;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
declare const DRAFT_VERSION = 4278190088n;
|
|
106
|
+
|
|
107
|
+
export { AnnounceState, BIDIRECTIONAL_MESSAGES, CLIENT_ONLY_MESSAGES, CONTROL_MESSAGES, DRAFT_VERSION, DatagramObject, DatagramStatusObject, Draft08DataStream, Draft08Message, Draft08MessageType, Draft08SessionFSM, FetchState, FetchStream, MESSAGE_ID_MAP, MESSAGE_TYPE_MAP, MSG_ANNOUNCE, MSG_ANNOUNCE_CANCEL, MSG_ANNOUNCE_ERROR, MSG_ANNOUNCE_OK, MSG_CLIENT_SETUP, MSG_FETCH, MSG_FETCH_CANCEL, MSG_FETCH_ERROR, MSG_FETCH_OK, MSG_GOAWAY, MSG_MAX_SUBSCRIBE_ID, MSG_SERVER_SETUP, MSG_SUBSCRIBE, MSG_SUBSCRIBES_BLOCKED, MSG_SUBSCRIBE_ANNOUNCES, MSG_SUBSCRIBE_ANNOUNCES_ERROR, MSG_SUBSCRIBE_ANNOUNCES_OK, MSG_SUBSCRIBE_DONE, MSG_SUBSCRIBE_ERROR, MSG_SUBSCRIBE_OK, MSG_SUBSCRIBE_UPDATE, MSG_TRACK_STATUS, MSG_TRACK_STATUS_REQUEST, MSG_UNANNOUNCE, MSG_UNSUBSCRIBE, MSG_UNSUBSCRIBE_ANNOUNCES, PARAM_AUTHORIZATION_INFO, PARAM_DELIVERY_TIMEOUT, PARAM_MAX_CACHE_DURATION, SERVER_ONLY_MESSAGES, SETUP_PARAM_MAX_SUBSCRIBE_ID, SETUP_PARAM_PATH, SessionPhase, SubgroupStream, SubscriptionState, TransitionResult, ValidationResult, decodeDataStream, decodeDatagram, decodeDatagramStatus, decodeFetchStream, decodeSubgroupStream, encodeDatagram, encodeDatagramStatus, encodeFetchStream, encodeSubgroupStream, getLegalIncoming, getLegalOutgoing };
|