We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I tried to connect with localhost 8081 port but its connect with diffrent port Error show below
SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = 127.0.0.1, port = 37702
code:
try { final wsUrl = Uri.parse('ws://127.0.0.1:8081/'); final channel = WebSocketChannel.connect(wsUrl); await channel.ready; channel.stream.listen((message) { print(message); //channel.sink.close(status.goingAway); }); channel.sink.add( '{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL2lzaGFuYmhhaVwvaWJcL2RhXC8iLCJ0b2tlbiI6IiQyeSQxMCQ5QTAuU2xkWDlpQllzdXJ3QWc1MVwvT3ZyT0tcLzF2TDZkUFFFMER3aU5tSlNkdUFtM09ad1phIiwic2FtcGxlIjoiMiIsInRyaXAiOiI6OjEifQ.B-RqQ6gO-w1mWT3uVVAiObGKRaKKzH0LT5L4zDa_NoE"}'); } catch (e) { print(e.toString()); }
The text was updated successfully, but these errors were encountered:
Any update to this issue?
Sorry, something went wrong.
This is because the localhost 8031 is not accessible by your mobile device. so u have to do adb reverse . the command is abd reverse tcp:8031 tcp:8031
abd reverse tcp:8031 tcp:8031
if u are using emulator or simulator than use the server 10.0.2.2
No branches or pull requests
I tried to connect with localhost 8081 port but its connect with diffrent port
Error show below
code:
The text was updated successfully, but these errors were encountered: