impl client/server version handshake

This commit is contained in:
Spencer Pogorzelski 2023-08-18 14:50:15 -07:00
parent edd83f54f9
commit ba77d77036
9 changed files with 114 additions and 10 deletions

View file

@ -55,4 +55,11 @@ export type WSErrorPayload = {
// WebRTC max is 16K, let's say 12K to be safe
export const MAX_CHUNK_SIZE = 12 * 1024;
export const S2C_HELLO_OK = ":3";
// these two end with a version string
export const C2S_HELLO = "haiii ";
export const S2C_HELLO_ERR = ":< ";
export const PROTOCOL_VERSION = "1.0";
export { Transport } from "./Transport";