Esempio n. 1
0
def main():
    parse_cmd()

    if sys.platform == 'darwin' and environ.get('TMUX') is not None:
        logger.error('Running Chrome inside tmux on OS X might cause problems.'
                     ' Please start leapcast outside tmux.')
        sys.exit(1)

    def shutdown(signum, frame):
        #ssdp_server.shutdown()
        bonjour_server.shutdown()
        castsocket_server.shutdown()
        leap_server.sig_handler(signum, frame)

    signal.signal(signal.SIGTERM, shutdown)
    signal.signal(signal.SIGINT, shutdown)

    #ssdp_server = SSDPserver()
    #ssdp_server.start(Environment.interfaces)

    castsocket_server = CastSocketServer()
    castsocket_server.start()

    bonjour_server = BonjourServer()
    bonjour_server.start(Environment.uuid, Environment.friendlyName)

    leap_server = LEAPserver()
    leap_server.start()
Esempio n. 2
0
def main():
    parse_cmd()
    logging.basicConfig(level=Environment.verbosity)

    server = HTTPThread()
    server.start()
    signal.signal(signal.SIGTERM, server.sig_handler)
    signal.signal(signal.SIGINT, server.sig_handler)

    reactor.callWhenRunning(LeapUPNPServer)
    reactor.run()
Esempio n. 3
0
def main():
    logging.basicConfig(level=logging.INFO)
    parse_cmd()

    server = HTTPThread()
    server.start()
    signal.signal(signal.SIGTERM, server.sig_handler)
    signal.signal(signal.SIGINT, server.sig_handler)

    reactor.callWhenRunning(LeapUPNPServer)
    reactor.run()
Esempio n. 4
0
def main():
    parse_cmd()
    logging.basicConfig(level=Environment.verbosity)

    if sys.platform == 'darwin' and environ.get('TMUX') is not None:
        logger.error('Running Chrome inside tmux on OS X might cause problems.'
                     ' Please start leapcast outside tmux.')
        sys.exit(1)

    server = HTTPThread()
    server.start()
    signal.signal(signal.SIGTERM, server.sig_handler)
    signal.signal(signal.SIGINT, server.sig_handler)

    reactor.callWhenRunning(LeapUPNPServer)
    reactor.run()
Esempio n. 5
0
def main():
    parse_cmd()

    if sys.platform == 'darwin' and environ.get('TMUX') is not None:
        logger.error('Running Chrome inside tmux on OS X might cause problems.'
                     ' Please start leapcast outside tmux.')
        sys.exit(1)

    def shutdown(signum, frame):
        ssdp_server.shutdown()
        leap_server.sig_handler(signum, frame)

    signal.signal(signal.SIGTERM, shutdown)
    signal.signal(signal.SIGINT, shutdown)

    ssdp_server = SSDPserver()
    ssdp_server.start(Environment.interfaces)

    leap_server = LEAPserver()
    leap_server.start()
Esempio n. 6
0
def main():
    parse_cmd()
    logging.basicConfig(level=Environment.verbosity)

    if sys.platform == 'darwin' and environ.get('TMUX') is not None:
        logger.error('Running Chrome inside tmux on OS X might cause problems.'
                     ' Please start leapcast outside tmux.')
        sys.exit(1)

    def shutdown(signum, frame):
        ssdp_server.shutdown()
        leap_server.sig_handler(signum, frame)

    signal.signal(signal.SIGTERM, shutdown)
    signal.signal(signal.SIGINT, shutdown)

    ssdp_server = SSDPserver()
    ssdp_server.start()

    leap_server = LEAPserver()
    leap_server.start()