sendCountEventToRelays method
void
sendCountEventToRelays(
- NostrCountEvent countEvent, {
- required void onCountResponse(
- String relay,
- NostrCountResponse countResponse
override
Implementation
@override
void sendCountEventToRelays(
NostrCountEvent countEvent, {
required void Function(String relay, NostrCountResponse countResponse)
onCountResponse,
}) {
final serialized = countEvent.serialized();
_runFunctionOverRelationIteration((relay) {
_registerOnCountCallBack(
subscriptionId: countEvent.subscriptionId,
onCountResponse: onCountResponse,
relay: relay.url,
);
relay.socket.sink.add(serialized);
utils.log(
'Count Event with subscription id: ${countEvent.subscriptionId} is sent to relay with url: ${relay.url}',
);
});
}