updateDescriptor method

void updateDescriptor(
  1. NodeDescriptor descriptor
)

Revises what this node advertises, without re-registering.

Sends the new descriptor to the hub, which replaces the one in its registry, so later discovery queries see it. Node id and liveness are unaffected. Requires isReady.

Implementation

void updateDescriptor(NodeDescriptor descriptor) {
  final typed = _typed;
  if (typed == null || _state != NodeState.ready) {
    throw const NodeUnavailableException('Node is not connected to a hub');
  }
  typed.send(NodeUpdate(descriptor));
}