def cold_start(): """ """ if _Debug: lg.out( 4, 'gateway.cold_start : sending "start" only to one transport - most preferable' ) callback.append_outbox_filter_callback(on_outbox_packet) callback.add_finish_file_receiving_callback(on_file_received) ordered_list = transports().keys() ordered_list.sort(key=settings.getTransportPriority, reverse=True) result = [] for proto in ordered_list: transp = transport(proto) if settings.transportIsEnabled(proto): if transp.state != 'LISTENING': if _Debug: lg.out(4, ' sending "start" to %s and stop' % transp) transp.automat('start') result.append(proto) break else: if _Debug: lg.out(4, ' %r is ready, try next one' % transp) reactor.callLater(5, packets_timeout_loop) return result
def start(): """ """ if _Debug: lg.out(4, 'gateway.start') callback.append_outbox_filter_callback(on_outbox_packet) result = [] for proto, transp in transports().items(): if settings.transportIsEnabled(proto): if transp.state != 'LISTENING': if _Debug: lg.out(4, ' sending "start" to %s' % transp) transp.automat('start') result.append(proto) else: if _Debug: lg.out(4, ' %r is ready' % transp) reactor.callLater(5, packets_timeout_loop) return result
def start(): """ """ if _Debug: lg.out(4, "gateway.start") callback.append_outbox_filter_callback(on_outbox_packet) result = [] for proto, transp in transports().items(): if settings.transportIsEnabled(proto): if transp.state != "LISTENING": if _Debug: lg.out(4, ' sending "start" to %s' % transp) transp.automat("start") result.append(proto) else: if _Debug: lg.out(4, " %r is ready" % transp) reactor.callLater(5, packets_timeout_loop) return result
def cold_start(): """ """ if _Debug: lg.out(4, 'gateway.cold_start : sending "start" only to one transport - most preferable') callback.append_outbox_filter_callback(on_outbox_packet) ordered_list = transports().keys() ordered_list.sort(key=settings.getTransportPriority, reverse=True) result = [] for proto in ordered_list: transp = transport(proto) if settings.transportIsEnabled(proto): if transp.state != "LISTENING": if _Debug: lg.out(4, ' sending "start" to %s and stop' % transp) transp.automat("start") result.append(proto) break else: if _Debug: lg.out(4, " %r is ready, try next one" % transp) reactor.callLater(5, packets_timeout_loop) return result