socket.io-ratelimiter
Version:
NPM module that can be used to rate limit socket.io events. Should not be seen as stable.
27 lines (22 loc) • 442 B
JavaScript
class SocketEventListenerDataPacket
{
constructor(pLogFunction, pSocket, pUser = {})
{
this.socket = pSocket;
this.user = pUser;
this.logFunc = pLogFunction;
}
getSocket()
{
return this.socket;
}
getUser()
{
return this.user;
}
log()
{
this.logFunc(...arguments);
}
}
module.exports = SocketEventListenerDataPacket;