public void close()
    {
        sendMessageToAll(new Message(MessageType.CLOSE));
        if(accepter != null)
            accepter.close();
        if(clients != null)
        {
            for(Client client: clients)
            {
                client.close();
            }
            clients.clear();
        }
        accepter = null;
    }