Commit 44cf433d by 段启岩

加入socket.io跨域

parent 220c03b8
......@@ -23,7 +23,10 @@ public class SocketIOConfig {
config.setOrigin(null);
config.setBossThreads(1);
config.setAllowCustomRequests(true);
config.setPingInterval(25000);
// Ping消息超时时间(毫秒),默认60秒,这个时间间隔内没有接收到心跳消息就会发送超时事件
config.setPingTimeout(180000);
// Ping消息间隔(毫秒),默认25秒。客户端向服务器发送一条心跳消息间隔
config.setPingInterval(60000);
return new SocketIOServer(config);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment