updateOptions method

void updateOptions(
  1. NodeOptions newOptions
)

Updates the NodeOptions property of the node, also reconnects the websocket to the new options

Implementation

void updateOptions(NodeOptions newOptions) {
  // Set the node id and client id before sending it to the isolate
  newOptions.clientId = this.options.clientId;
  newOptions.nodeId = this.options.nodeId;

  _nodeSendPort.send({"cmd": "UPDATE", "data": newOptions._toJson()});

  this.options = newOptions;
}