Closed hatemragab closed 3 years ago
@hatemragab if you want to use callbacks, please check out emitWithAck
which will return a promise.
You can do something like:
final args = await emitWithAck(....);
console.log('Ack given by server: $args');
-or-
emitWithAck(....).then((args) {
console.log('callback called with args $args');
});
Thanks for replying I already know this case that clint emit what about if server emit and need to confirm that the clint has received
Thanks for replying I already know this case that clint emit what about if server emit and need to confirm that the clint has received
same thing. the listener you create has an ack callback
I have fix it by check if socket.connected true then emit if not not emi
@hatemragab a new API is added now in V1.0.0
socket.connectSync
please check new example in README for more
Feel free to re-open if you still face this issue
i want to implement something like server code
clint code
how to perform that in dart callback function not supported in dart version