flutter_socket_io
flutter_socket_io copied to clipboard
Receiver not called when data is received , when i send data receiver is called
I see the socket connected and when i emit the data it works perfectly the data is sent and the receiver for the event is triggered, but when the data is sent from the server the receiver doesn't triggers. I don't know why that's happening?
`initSocket(String identifier) async {
setState(() => _isProbablyConnected[identifier] = true);
socket = await manager.createInstance(SocketOptions(
//Socket IO server URI
"******************",
query: {
"token": "*******",
}, //Enable required transport
));
socket.onConnect((data) {
print("connected");
});
socket.onConnectError(print);
socket.onConnectTimeout(print);
socket.onError(print);
socket.onDisconnect(print);
socket.on("receive", (data) {
setState(() {
print(data.toString());
});
});
socket.connect();
sockets[identifier] = socket;
}`
@souravmunjal Are you saying the receive event from server is not triggered?
Can you try and see if this issue is reproduced in new release (v1.0.0)