Flutter implementing socket.io with dart

8,291

Solution 1

I have ported socket.io in dart code since 2017, and it can work with flutter as well in the same codebase - socket.io-client-dart and socket.io-dart.

Solution 2

Using this flutter_socket_io package, I managed to connect to my local Socket IO server.

SocketIO socket = SocketIOManager().createSocketIO("http://localhost:3000", "/");
socket.init();
socket.connect();

Maybe you could share your implementation on both client and server side to debug further.

Share:
8,291
Muhammad Faizan
Author by

Muhammad Faizan

Updated on December 07, 2022

Comments

  • Muhammad Faizan
    Muhammad Faizan over 1 year

    i am trying to implement socket.io with my flutter app, currently flutter is supporting WebSocket but i have found a way for socket.io in package "dart.io" but i am unable to understand how to emit a message on a specific event. Any suggestions would be helpful :)