Sdk: RawSocket connect - different port than specified

Created on 19 Apr 2019  路  2Comments  路  Source: dart-lang/sdk

When I connect using RawSocket.connect("My VPS IP", 3306), it throws SocketException with a different port than specified:
SocketException: OS Error: Connection refused, errno = 111, address = <IP>, port = 40048

Shortest reproduce code:

import 'dart:io';

void main () async {
  try {
    await RawSocket.connect("My IP", 3306);
  } catch (e) {
    print(e);
  }
}

Dart SDK Version (dart --version):
Dart VM version: 2.2.0 (Tue Feb 26 15:04:32 2019 +0100) on "windows_x64"


I'm obviously using real IP.

P2 area-library closed-duplicate library-io type-bug

Most helpful comment

none of this actually worked for me :/
this command worked like magic "adb reverse tcp:5000 tcp:5000" 馃挴

All 2 comments

Closing as a duplicate of #12693 which has more info.

none of this actually worked for me :/
this command worked like magic "adb reverse tcp:5000 tcp:5000" 馃挴

Was this page helpful?
0 / 5 - 0 ratings