sdroege/async-tungstenite

Cloning `WebSocketStream`s

Closed this issue · 1 comments

Is it possible to share multiple owned clones of one stream?

Not directly, but you can put them into an Arc and async Mutex to achieve that, or spawn a task that reads/writes to a channels and is filled/emptied from another place, or many other options.

There's no reason to put the additional complexity here if it can be built on top quite easily.