nym icon indicating copy to clipboard operation
nym copied to clipboard

impl AsyncRead, AsyncWrite for native MixnetClient

Open durch opened this issue 1 year ago • 3 comments

Heavily inspired by what @mfahampshire did for mix-tcp, folds AsyncRead functionality into the MixnetClient.

TODO:

  • [x] Sink
  • [x] AsyncWrite
  • [ ] Add examples

Interesting changes in wasm, due to Sink, we now need &mut for sending, so had to wrap stuff in RwLock in wasm client and mixfetch


This change is Reviewable

durch avatar Jun 10 '24 09:06 durch

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
nym-explorer ⬜️ Ignored (Inspect) Visit Preview Jun 25, 2024 1:01pm
nym-next-explorer ⬜️ Ignored (Inspect) Visit Preview Jun 25, 2024 1:01pm

vercel[bot] avatar Jun 10 '24 09:06 vercel[bot]

We can keep this one open for the other changes (AsyncWrite + Sink) as well, it will be easier to polish wholesale

durch avatar Jun 10 '24 11:06 durch

it's definitely not in the scope for this feature, but I wonder if conceptually it would make sense for AsyncRead and AsyncWrite to completely bypass message reconstructing and operate on raw bytes instead where it's up to the caller to deal with them as they see fit

jstuczyn avatar Jun 11 '24 08:06 jstuczyn