Skip to content

How can I send json Data to emit. #179

Open
@PhyoeKo

Description

@PhyoeKo

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!.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions