feat: update to 0.0.12

This commit is contained in:
2025-04-18 01:16:06 +08:00
parent 17e515ad32
commit afad59e0ab
7 changed files with 73 additions and 27 deletions

View File

@@ -1,8 +1,10 @@
// @ts-type=ws
import { WebSocketServer } from 'ws';
import type { WebSocket } from 'ws';
import { Server } from './server.ts';
import { parseIfJson } from '../utils/parse.ts';
export const createWsServer = (server: Server) => {
// 将 WebSocket 服务器附加到 HTTP 服务器
const wss = new WebSocketServer({ server: server.server as any });