improve on connection logging

This commit is contained in:
Elijah R
2024-05-27 00:10:56 -04:00
parent 8add016b60
commit 565bf7d9b5
2 changed files with 2 additions and 1 deletions

View File

@@ -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));

View File

@@ -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}`);
} }
} }