feat: support websocket connections from game client #2735

Merged
Sainan merged 19 commits from client-ws into main 2025-09-10 00:00:10 -07:00
Showing only changes of commit 8499f3ee67 - Show all commits

View File

@ -222,7 +222,7 @@ export const sendWsBroadcastTo = (accountId: string, data: IWsMsgToClient): void
}); });
}; };
export const sendWsBroadcastEx = (data: IWsMsgToClient, accountId?: string, excludeWsid?: number): void => { export const sendWsBroadcastEx = (data: IWsMsgToClient, accountId: string | undefined, excludeWsid: number): void => {
const msg = JSON.stringify(data); const msg = JSON.stringify(data);
forEachClient(client => { forEachClient(client => {
if ((!accountId || client.accountId == accountId) && client.id != excludeWsid) { if ((!accountId || client.accountId == accountId) && client.id != excludeWsid) {