@Override
    public void run() {
        int run = 1;
        while (run == 1) {
            String message = "";
            // Block and wait for input from the socket
            try {
                message = socket.readMessage();
                if (message==null) {
                    try {
                        server.removeSocket(hash);
                    } catch (IOException e) {

                    }
                } else {
                    server.handleMessage(message,hash);
                }
            } catch (IOException e) {
                
            }
        }
    }