push method
Pushes event with payload to topic. Returns a PushResult
reflecting the server's reply (or a timeout/disconnect marker).
Implementation
@override
Future<PushResult> push(
String topic,
String event,
Map<String, dynamic> payload,
) async {
recorded.pushes.add(
RecordedPush(topic: topic, event: event, payload: payload),
);
final queue = _replyQueue['$topic::$event'];
if (queue == null || queue.isEmpty) {
return const PushTimeout();
}
return queue.removeAt(0);
}