为所有函数和类添加中文注释文档字符串
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user