def initTask(self):
        super(NBServerTask, self).initTask()

        self._stopped = False

        # Construct TServerSocket this way for compatibility with fbthrift
        self.socket = TServerSocket(port=self.port)
        self.socket.host = self.host

        self.server = TNonblockingServer(self.processor, self.socket,
                                         threads=self.num_threads)
        self.server.prepare()

        self.bound_addrs = []
        for handle in self._get_socket_handles(self.server.socket):
            addrinfo = handle.getsockname()
            self.bound_host, self.bound_port = addrinfo[0:2]
            self.logger.info("%s Server Started on %s", self.name,
                self._fmt_hostport(self.bound_host, self.bound_port))
Display a numpy image buffer in a remote Ginga reference viewer.
dataset/ETHPy150Open facebook/sparts/sparts/tasks/thrift/nbserver.py/NBServerTask.initTask--crossover with--dataset/ETHPy150Open ejeschke/ginga/ginga/util/grc.py/_channel_proxy.load_np