You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I write an example of sending message through a utp stream: jason-ni@76b93ec
However, it can not be compiled. It seems the "Send" marker is not sufficient to allow spawning a future with UtpStream. I tried to add the "Sync" marker. Then it can be compiled and run as expected. But I don't think that's the correct fix. My simple code may not be complicated enough to trigger some race condition.
Another issue is the UtpStream is hard to be split into read half and write half like tokio's TcpStream. Splitting to 2 separated halves is critical to implement a full-duplex proxy, as I understand(tokio-rs/tokio#1108).
Maybe we need to add another layer of indirection by using channel. How do you think?
The text was updated successfully, but these errors were encountered:
Hi,
I write an example of sending message through a utp stream: jason-ni@76b93ec
However, it can not be compiled. It seems the "Send" marker is not sufficient to allow spawning a future with UtpStream. I tried to add the "Sync" marker. Then it can be compiled and run as expected. But I don't think that's the correct fix. My simple code may not be complicated enough to trigger some race condition.
Another issue is the UtpStream is hard to be split into read half and write half like tokio's TcpStream. Splitting to 2 separated halves is critical to implement a full-duplex proxy, as I understand(tokio-rs/tokio#1108).
Maybe we need to add another layer of indirection by using channel. How do you think?
The text was updated successfully, but these errors were encountered: