class_docstr: extends base pathos server to an XML-RPC dispatcher
class_docstr_tok: ["extends","base","pathos","server","to","an","XML-RPC","dispatcher"]
docstr: prepare a listening socket
docstr_tok: ["prepare","a","listening","socket"]
code: def _installSocket(self, host, port):
      """prepare a listening socket"""
  
      from pathos.portpicker import portnumber
  
      s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      if port == 0:  # Get a random port
          pick = portnumber(min=port, max=64 * 1024)
          while True:
              try:
                  port = pick()
                  s.bind((host, port))
                  break
              except socket.error:
                  continue
      else:  # Designated port
          s.bind((host, port))
  
      s.listen(10)
      self._socket = s
      self.host = host
      self.port = port
      return
  
imports: import os
  import socket
  import xmlrpc.client
  from http.server import BaseHTTPRequestHandler
  from xmlrpc.server import SimpleXMLRPCDispatcher
  from pathos.server import Server
  from pathos.util import print_exc_info, spawn2, _str, _b
  from pathos import logger
label_desc: Use image node_id 8 for calling the XMLRPCServer obj's underlying member method code with example usage: obj._installSocket(host, port) without return types