[英]Socket.io - Limit max number of connections?
Let's say I want only up to 100 users to join my server.假设我只希望最多 100 个用户加入我的服务器。 Is there a way to do this internally?
有没有办法在内部做到这一点?
Something like:就像是:
io.maxConnections = 100; //If client connections == 100, refuse next client connection
Based on @turivishal's answer, I found:根据@turivishal 的回答,我发现:
server.maxConnections = 100;//Max number of connections
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.