mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-05-23 20:46:15 -05:00
25 lines
533 B
TypeScript
25 lines
533 B
TypeScript
import {
|
|
WebClient,
|
|
SessionEvents,
|
|
RoomEvents,
|
|
GameEvents,
|
|
SessionCommands,
|
|
} from '@app/websocket';
|
|
import type { WebClientConfig } from '@app/websocket';
|
|
|
|
import { createWebClientResponse } from './response';
|
|
|
|
export function initWebClient(): void {
|
|
const response = createWebClientResponse();
|
|
|
|
const config: WebClientConfig = {
|
|
response,
|
|
sessionEvents: SessionEvents,
|
|
roomEvents: RoomEvents,
|
|
gameEvents: GameEvents,
|
|
keepAliveFn: (cb) => SessionCommands.ping(cb),
|
|
};
|
|
|
|
new WebClient(config);
|
|
}
|