为所有函数和类添加中文注释文档字符串

This commit is contained in:
2026-06-10 10:34:11 +08:00
parent c612a7ad71
commit c3f93e4441
29 changed files with 103 additions and 17 deletions
+2
View File
@@ -11,6 +11,7 @@ from configs.load import config
async def handle_client(websocket):
"""处理单个WebSocket客户端连接"""
client = websocket.remote_address
logger.info(f"Client connected: {client}")
@@ -21,6 +22,7 @@ async def handle_client(websocket):
async def main():
"""启动WebSocket信令服务器"""
cfg = config.server
logger.info(f"WebRTC signaling server: ws://{cfg.host}:{cfg.port}")
async with websockets.serve(handle_client, cfg.host, cfg.port, max_size=cfg.max_ws_size):