add npm stuff, dist/ folder

This commit is contained in:
CoolElectronics 2023-08-24 15:21:24 -04:00
parent ac3a135fff
commit 15304a80fe
No known key found for this signature in database
GPG key ID: F63593D168636C50
22 changed files with 50951 additions and 11 deletions

47
dist/protocol.mjs vendored Normal file
View file

@ -0,0 +1,47 @@
// protocol/src/Transport.ts
var Transport = class {
constructor(onopen, onclose) {
this.onopen = onopen;
this.onclose = onclose;
}
ondata = () => {
};
};
// protocol/src/index.ts
var C2SRequestTypes = {
HTTPRequestStart: 0,
HTTPRequestChunk: 1,
HTTPRequestEnd: 2,
WSOpen: 3,
WSClose: 4,
WSSendText: 5,
WSSendBinary: 6
};
var S2CRequestTypes = {
HTTPResponseStart: 0,
HTTPResponseChunk: 1,
HTTPResponseEnd: 2,
WSOpen: 3,
WSClose: 4,
WSTextStart: 5,
WSBinaryStart: 6,
WSDataChunk: 7,
WSDataEnd: 8,
WSError: 9
};
var MAX_CHUNK_SIZE = 12 * 1024;
var S2C_HELLO_OK = ":3";
var C2S_HELLO = "haiii ";
var S2C_HELLO_ERR = ":< ";
var PROTOCOL_VERSION = "3.0";
export {
C2SRequestTypes,
C2S_HELLO,
MAX_CHUNK_SIZE,
PROTOCOL_VERSION,
S2CRequestTypes,
S2C_HELLO_ERR,
S2C_HELLO_OK,
Transport
};