コード例 #1
0
    def __init__(self):
        try:
            managedInfo = init(transports.transports.keys())
        except EnvException:
            log.warn("Server managed-proxy protocol failed.")
            return

        log.debug("pyptlib gave us the following data:\n'%s'",
                  pprint.pformat(managedInfo))

        for transport, transport_bindaddr in managedInfo['transports'].items():
            ok, addrport = self.launchServer(transport, transport_bindaddr,
                                             managedInfo)
            if ok:
                log.debug("Successfully launched '%s' at '%s'" %
                          (transport, str(addrport)))
                reportSuccess(transport, addrport, None)
            else:
                log.info("Failed to launch '%s' at '%s'" %
                         (transport, str(addrport)))
                reportFailure(transport, 'Failed to launch')

        reportEnd()

        log.info("Starting up the event loop.")
        reactor.run()
コード例 #2
0
ファイル: server.py プロジェクト: ch3n2k/pyobfsproxy
def do_managed_server():
    should_start_event_loop = False

    try:
        managedInfo = init(transports.transports.keys())
    except EnvError, err:
        log.warning("Server managed-proxy protocol failed (%s)." % err)
        return
コード例 #3
0
def do_managed_server():
    """Start the managed-proxy protocol as a server."""

    should_start_event_loop = False

    try:
        managed_info = init(transports.transports.keys())
    except EnvError, err:
        log.warning("Server managed-proxy protocol failed (%s)." % err)
        return
コード例 #4
0
ファイル: server.py プロジェクト: gdfdp/bluesky-pluggable
    def __init__(self):
        try:
            managedInfo = init(transports.transports.keys())
        except EnvException:
            log.warn("Server managed-proxy protocol failed.")
            return

        log.debug("pyptlib gave us the following data:\n'%s'", pprint.pformat(managedInfo))

        for transport, transport_bindaddr in managedInfo['transports'].items():
            ok, addrport = self.launchServer(transport, transport_bindaddr, managedInfo)
            if ok:
                log.debug("Successfully launched '%s' at '%s'" % (transport, str(addrport)))
                reportSuccess(transport, addrport, None)
            else:
                log.info("Failed to launch '%s' at '%s'" % (transport, str(addrport)))
                reportFailure(transport, 'Failed to launch')

        reportEnd()

        log.info("Starting up the event loop.")
        reactor.run()