def __innerListener(self):
     self.__innerSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     self.__innerSock.bind(("", self.__innerPort))
     self.__innerSock.listen(100)
     Logger.info("Inner service listening...")
     while self.__switch:
         sockclient, addr = self.__innerSock.accept()
         Logger.info("%s:%s Inner service connected..." % addr)
         inner = InnerService.InnerService(sockclient, addr[0])
         inner.running()
     self.__innerSock.close()
 def __outerListener(self):
     self.__outerSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     self.__outerSock.bind(("", self.__outerPort))
     self.__outerSock.listen(100)
     Logger.info("Outer service listening...")
     while self.__switch:
         sockclient, addr = self.__outerSock.accept()
         Logger.info("%s:%s Outer service connected..." % addr)
         outer = OuterService.OuterService(sockclient, addr[0])
         outer.setTerminalManager(TerminalManager)
         outer.running()
     self.__outerSock.close()