UNPKG

@mothepro/fancy-p2p

Version:

A quick and efficient way to form p2p groups in the browser

27 lines (26 loc) 643 B
/** Number of bytes that a data type takes up. */ export declare const enum Size { CHAR = 1, SHORT = 2, INT = 4, BIG = 8 } /** Max value that can fit in a data type. */ export declare const enum Max { CHAR = 255, SHORT = 65535, INT = 4294967295, BIG = 18446744073709552000 } /** * Prefix to buffer sent from server to the clients. * Should exactly match `Code` enum in https://github.com/mothepro/signaling-lobby/blob/master/util/constants.ts */ export declare const enum Code { CLIENT_LEAVE = 0, CLIENT_JOIN = 1, GROUP_REQUEST = 2, GROUP_REJECT = 3, GROUP_FINAL = 4, YOUR_NAME = 5 }