def unpublish(desc, type, port, properties=None, add_hostname=True):
 server = start_server()
 service = create_service(desc, type, port, properties, add_hostname)
 server.unregisterService(service)
 if (server.countRegisteredServices() == 0):
  stop_server()

def unpublish ( desc , type , port , properties = None , add_hostname = True ) : server = start_server ( ) service = create_service ( desc , type , port , properties , add_hostname ) server . unregisterService ( service ) if ( server . countRegisteredServices ( ) == 0 ) : stop_server ( )
unpublish a service .