abstract websocket to allow additional transport layers

This commit is contained in:
Elijah R
2024-05-26 23:19:55 -04:00
parent 173ee8149f
commit 7053973205
7 changed files with 243 additions and 145 deletions

View File

@@ -0,0 +1,8 @@
export default interface NetworkClient {
getIP() : string;
send(msg: string) : Promise<void>;
close() : void;
on(event: string, listener: (...args: any[]) => void) : void;
off(event: string, listener: (...args: any[]) => void) : void;
isOpen() : boolean;
}