示例#1
0
def start(parser, iflist=interfaces.avail()):
    # starts one thread for each interface
    # CmdServer automatically starts a new server thread when received a new
    # command
    global server_threads
    server_threads = []  # if restarted, clear all old threads
    for interface in iflist:
        thread = CmdServer(parser, interfaces.get(interface))
        server_threads.append(thread)
        thread.start()
示例#2
0
 def send_message(self, msg):
     interface = interfaces.get(self.interface_name)
     return interface.send_message(self, msg)
示例#3
0
 def get_display_name(self):
     interface = interfaces.get(self.interface_name)
     return interface.get_display_name(self)