improve on connection logging
This commit is contained in:
@@ -23,6 +23,7 @@ export default class TCPServer extends EventEmitter implements NetworkServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private onConnection(socket: Socket) {
|
private onConnection(socket: Socket) {
|
||||||
|
this.logger.Info(`New TCP connection from ${socket.remoteAddress}`);
|
||||||
var client = new TCPClient(socket);
|
var client = new TCPClient(socket);
|
||||||
this.clients.push(client);
|
this.clients.push(client);
|
||||||
this.emit('connect', new User(client, IPDataManager.GetIPData(client.getIP()), this.Config));
|
this.emit('connect', new User(client, IPDataManager.GetIPData(client.getIP()), this.Config));
|
||||||
|
|||||||
@@ -147,6 +147,6 @@ export default class WSServer extends EventEmitter implements NetworkServer {
|
|||||||
ws.close();
|
ws.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.logger.Info(`Connect from ${user.IP.address}`);
|
this.logger.Info(`New WebSocket connection from ${user.IP.address}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user