void start(){
        ServerSocket server = null;
        // Try to establish a server
        try {
            server = new ServerSocket(port);
        } catch (IOException e) {
            System.err.println("Could not listen on port: " + port);
            System.exit(-1);
        }

        // If we get a connection assign it to the client socket
        try {
            // We pass the worker thread the queue for ease of use
            while(listening)
                (new ServerThread(server.accept(),queue)).run();
        } catch (IOException e) {
            System.err.println("Accept failed: " + port);
            System.exit(-1);
        }
    }