uyem
Version:
WebRTC client-server SFU application
38 lines • 1.45 kB
TypeScript
/******************************************************************************************
* Repository: https://github.com/kolserdav/werift-sfu-react.git
* File name: index.ts
* Author: Sergey Kolmiller
* Email: <uyem.ru@gmail.com>
* License: MIT
* License text: See in LICENSE file
* Copyright: kolserdav, All rights reserved (c)
* Create Date: Wed Nov 23 2022 15:23:26 GMT+0700 (Krasnoyarsk Standard Time)
******************************************************************************************/
import { WebSocket, Server } from 'ws';
import { LocaleValue, SendMessageArgs, MessageType } from '../types/interfaces';
import DB from '../core/db';
export declare type WSItem = Record<string, Record<string, {
locale: LocaleValue;
ws: WebSocket;
connId: string;
}>>;
export declare type ServerCallback = (args: Server<WebSocket>) => void;
export declare abstract class ConnectorInterface extends DB {
abstract users: WSItem;
abstract setUnit(args: {
roomId: string | number;
userId: string | number;
ws: WebSocket;
locale: LocaleValue;
connId: string;
}): void;
abstract sendMessage<T extends keyof typeof MessageType>(args: {
msg: SendMessageArgs<T>;
roomId: string | number;
}, cb?: () => void): void;
abstract cleanUnit(args: {
roomId: string | number;
userId: string | number;
}): void;
}
//# sourceMappingURL=index.d.ts.map