def METHOD_NAME(server_address='hue.uds', verify=None):
  """
  Start up a socket server on the specified unix domain socket, and listen for new
  configurations.
  """
  class ConfigStreamHandler(StreamRequestHandler):
    """
    Handler for a streaming logging request.
    This basically logs the record using whatever logging policy is
    configured locally.
    """
    def handle(self):
      """
      Handle multiple requests - each expected to be a 4-byte length,
      followed by the LogRecord in pickle format. Logs the record
      according to whatever policy is configured locally.
      """
      while self.server.ready:
        chunk = self.connection.recv(4)
        if len(chunk) < 4:
          break
        slen = struct.unpack('>L', chunk)[0]
        chunk = self.connection.recv(slen)
        while len(chunk) < slen:
          chunk = chunk + self.connection.recv(slen - len(chunk))
        obj = pickle.loads(chunk)
        record = logging.makeLogRecord(obj)
        self.handleLogRecord(record)
    def handleLogRecord(self, record):
      # if a name is specified, we use the named logger rather than the one
      # implied by the record.
      if self.server.logname is not None:
        name = self.server.logname
      else:
        name = record.name
      logger = logging.getLogger(name)
      logger.handle(record)
  class ConfigSocketReceiver(ThreadingTCPServer):
    """
    A simple TCP socket-based logging config receiver.
    """
    request_queue_size = 1
    def __init__(self, server_address='hue.uds', handler=None,
                 ready=None, verify=None):
      ThreadingTCPServer.__init__(self, server_address, handler)
      logging._acquireLock()
      self.abort = 0
      logging._releaseLock()
      self.timeout = 1
      self.ready = ready
      self.verify = verify
      self.logname = None
      self.server_address = server_address
    def server_bind(self):
      # Create a UDS socket
      self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
      self.socket.bind(self.server_address)
      st = os.stat(self.server_address)
      os.chmod(self.server_address, st.st_mode | stat.S_IWOTH)
    def server_activate(self):
      self.socket.listen(self.request_queue_size)
    def serve_until_stopped(self):
      abort = 0
      while not abort:
        rd, wr, ex = select.select([self.socket.fileno()],
                       [], [],
                       self.timeout)
        if rd:
          self.handle_request()
        logging._acquireLock()
        abort = self.abort
        logging._releaseLock()
      self.server_close()
  class Server(threading.Thread):
    def __init__(self, rcvr, hdlr, server_address, verify):
      super(Server, self).__init__()
      self.rcvr = rcvr
      self.hdlr = hdlr
      self.server_address = server_address
      self.verify = verify
      self.ready = threading.Event()
    def run(self):
      server = self.rcvr(server_address=self.server_address, handler=self.hdlr,
                         ready=self.ready, verify=self.verify)
      self.ready.set()
      global _udslistener
      logging._acquireLock()
      _udslistener = server
      logging._releaseLock()
      server.serve_until_stopped()
    def stop(self):
      udsstopListening()
      self.ready.clear()
    def stopped(self):
      return self.ready.is_set()
  return Server(ConfigSocketReceiver, ConfigStreamHandler, server_address, verify)