subscribe method
void
subscribe({})
Records that subscriberEndpointId wants streamName from
producerEndpointId.
Idempotent: a repeated subscription is not an error, because discovery re-reports the same peer on every cycle.
Implementation
void subscribe({
required String streamName,
required String producerEndpointId,
required String subscriberEndpointId,
}) {
_subscribers
.putIfAbsent(streamName, () => {})
.putIfAbsent(producerEndpointId, () => {})
.add(subscriberEndpointId);
}