class_docstr: InferenceServer class starts zmq.rep as backend.
  
  Args:
      modules_name(list): modules name
      gpus(list): GPU devices index
class_docstr_tok: ["InferenceServer","class","starts","zmq.rep","as","backend",".","Args",":","modules_name","(","list",")",":","modules","name","gpus","(","list",")",":","GPU","devices","index"]
code: def listen(self, port: int):
      if platform.system() == "Windows":
          back_port = int(port) + 1
          for index in range(100):
              if not is_port_occupied("127.0.0.1", back_port):
                  break
              else:
                  back_port = int(back_port) + 1
          else:
              raise RuntimeError(
                  "Port from %s to %s is occupied, please use another port"
                  % (int(port) + 1, back_port)
              )
          worker_backend = "tcp://localhost:%s" % back_port
          backend = "tcp://*:%s" % back_port
      else:
          worker_backend = "ipc://backend.ipc"
          backend = "ipc://backend.ipc"
  
      start_workers(
          modules_info=self.modules_info,
          gpus=self.gpus,
          backend_addr=worker_backend,
      )
      d = InferenceDevice()
      d.listen("tcp://*:%s" % port, backend)
  
file_path: PaddleHub/paddlehub/serving/device.py
imports: import zmq
  import time
  import os
  import json
  import platform
  import traceback
  import subprocess
  from paddlehub.utils import log
  from paddlehub.utils.utils import is_port_occupied
label_desc: Use image node_id 2 for calling the InferenceServer obj's underlying member method code with example usage: obj.listen(port) without return types