push method
Implementation
Push push(
ChannelEvents event,
Map<String, String?> payload, {
Duration? timeout,
}) {
if (!joinedOnce) {
throw "tried to push '${event.eventName()}' to '$topic' before joining. Use channel.subscribe() before pushing events";
}
final pushEvent = Push(this, event, payload, timeout ?? _timeout);
if (canPush()) {
pushEvent.send();
} else {
pushEvent.startTimeout();
_pushBuffer.add(pushEvent);
}
return pushEvent;
}