send method
Sends an event to the node if the data type matches T. Updates the lastData and adds the event to the stream.
Implementation
void send(EventDTO dto) {
if (dto.data is T) {
var d = EventDTO<T>(dto.data, topic: dto.topic, completer: dto.completer);
lastData = dto.data;
_streamController.add(d);
}
}