RawSocket connect – different port than specified

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.

Author: Fantashit

1 thought on “RawSocket connect – different port than specified

  1. none of this actually worked for me :/
    this command worked like magic “adb reverse tcp:5000 tcp:5000” 💯

Comments are closed.