def main(sid, token, to, from_, url):
    """Create, connect, and block on the listener worker."""
    try:
        worker = APNSWorker(sid=sid, token=token, to=to, from_=from_, url=url)
        worker.connect()
        worker.run_forever()
    except KeyboardInterrupt:
        worker.close()