Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I send json Data to emit. #179

Open
PhyoeKo opened this issue Sep 3, 2021 · 0 comments
Open

How can I send json Data to emit. #179

PhyoeKo opened this issue Sep 3, 2021 · 0 comments

Comments

@PhyoeKo
Copy link

PhyoeKo commented Sep 3, 2021

I am using latest version of adhara_socket_io,
In console log socket is connected and onConnect data is empty [].
I want to send the data with JSON format, so I tried like below

void sendMessageWithACK(String identifier) { print('$identifier | Sending ACK message...'); final msg = [ {"name": "Phyoe Ko", "room": widget.roomId, "id": 32}, ]; sockets[identifier].emitWithAck('joinRoom', [{"name": "Phyoe Ko", "room": widget.roomId, "id": 32}]).then((data) { // this callback runs when this // specific message is acknowledged by the server print('$identifier | ACK received | $msg -> $data'); }); }

but ackData is not respond anything, what's wrong with my code? Please help me!.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant