Skip to content
New issue

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

[Flutter] Keep waiting for the https api response in local port forwarding for large response data #84

Open
dhavalpzala opened this issue Jul 28, 2023 · 0 comments

Comments

@dhavalpzala
Copy link

Hi,

I connected to SSH Local port forwarding in Flutter App using dartssh2.

It is working fine for small HTTPS api responses but it is keep waiting in case on LARGE https api response.

final serverSocket = await ServerSocket.bind(sourceIp, sourcePort);

    await for (final socket in serverSocket) {
      final forward =
          await _sshClient.forwardLocal(destinationIp, destinationPort);
      forward.stream.cast<List<int>>().pipe(socket);
      socket.cast<List<int>>().pipe(forward.sink);
    }

Can you please help me to resolve it.

Thanks,
Dhaval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant