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

Incomplete chunk reading/writing for streams #150

Closed
poshcoe opened this issue May 3, 2024 · 2 comments
Closed

Incomplete chunk reading/writing for streams #150

poshcoe opened this issue May 3, 2024 · 2 comments

Comments

@poshcoe
Copy link

poshcoe commented May 3, 2024

Hi,

Thanks for making this library! I've been using xwt while developing a small WASM/native app and it's saved me a lot of time.

I see that there has been a start on supporting chunked reading/writing with the ReadChunk and WriteChunk traits in xwt-core, but it seems these are not implemented anywhere as of yet. (Am I missing something?)

What are the blockers for implementation of these traits within xwt-web-sys and xwt-wtransport?

I may be able to lend a hand.

@MOZGIII
Copy link
Owner

MOZGIII commented May 3, 2024

I think it is implemented for xwt-wtransport but not for xwt-web-sys.

You should be able to use it today by applying additional requirements to the traits. It won't work with xwt-web-sys today though.

I am not sure if this can even be implemented for xwt-web-sys - need to investigate. Any help is appreciated.

@MOZGIII
Copy link
Owner

MOZGIII commented May 10, 2024

I have checked, and it does not looks like the chunk reading/writing APIs can be implemented with the web APIs.

There is an API for atomic writes - but that is a different thing, and is not quite the same.


Note that chunks API is not a replacement for data framing - if you need to send data packets over the streams I suggest adding framing manually on top of the regular stream read/write APIs.

@MOZGIII MOZGIII closed this as completed Jun 3, 2024
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

2 participants