const net = require("net");
const EventEmitter = require("events").EventEmitter;



class ChatServer {
    constructor() {
        this.chatters = {};
        this.server = net.createServer(this.handleConnection.bind(this));
        this.server.listen(1212, "localhost");
    }
    isNicknameLegal(nickname) {