添加路由
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m6s

This commit is contained in:
Song367 2025-09-30 17:24:31 +08:00
parent f78ebc2959
commit 5f611d2192
2 changed files with 4 additions and 1 deletions

View File

@ -9,6 +9,7 @@ const { MessageHistory } = require('./src/message_history.js');
const app = express(); const app = express();
const server = http.createServer(app); const server = http.createServer(app);
const io = socketIo(server, { const io = socketIo(server, {
path: '/emotion-male-app/socket.io',
pingTimeout: 300000, // 60秒超时 pingTimeout: 300000, // 60秒超时
pingInterval: 25000, // 25秒心跳间隔 pingInterval: 25000, // 25秒心跳间隔
upgradeTimeout: 30000, // 30秒升级超时 upgradeTimeout: 30000, // 30秒升级超时

View File

@ -172,7 +172,9 @@ class WebRTCChat {
} }
initializeSocket() { initializeSocket() {
this.socket = io(); this.socket = io({
path: '/emotion-male-app/socket.io'
});
this.socket.on('connect', () => { this.socket.on('connect', () => {
this.updateStatus('已连接到服务器', 'connected'); this.updateStatus('已连接到服务器', 'connected');