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

fix:used universal_io instead of dart:io to support web platform #97

Closed
wants to merge 2 commits into from

Conversation

dhanrajmahurkar
Copy link

current implementation does not allow redis pub/sub to work on web (chrome/web-server). By using universal_io instead of dart:io we can fix this issue

@dhanrajmahurkar dhanrajmahurkar changed the title used universal_io instead of dart:io fix:used universal_io instead of dart:io to support web platform Apr 18, 2024
@ra1u
Copy link
Owner

ra1u commented Apr 18, 2024

Hi @dhanrajmahurkar

We currently have method connectWithSocket and this is something you can start with.

Additionaly, lowest abstraction needed here is actually just Stream but we dont support it right now. You can start and add method connectWithStream in similar way as it is connectWithSocket.

After having connectWithStream you can abstract your protocol to allow sending relevant payload data as Stream, you should be fine.with any kind of overlay connection.

@ra1u
Copy link
Owner

ra1u commented Apr 18, 2024

My mistake here.

One reason that we can not use only Stream in this library currently, is that there is no method add for Stream and one can not send data to stream. There is however CustomStream , that lives in async world only, but there is no much of use of it.

In general out of the box, you should be able to work with any class that looks like a Stream (Socket as of now), but has additional add and close methods.

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

Successfully merging this pull request may close these issues.

2 participants