Using async websocket using tokio-tungstenite

hello all, first time posting here, and this is fairly specific to tokio-tungstenite, so hopefully this is applicable, but i'd figure i'd ask here first to see if there's something simple i'm missing. basically, i want to be able to accept messages from the tokio-tungstenite websocket, but when i'm trying to send a message, the fwd_to_ws future ends unexpectedly (at least to me).

i based my code mostly on the client example from the tokio-tungstenite project: tokio-tungstenite/ at master · snapview/tokio-tungstenite · GitHub

anyways, my code is here, i've added a few comments explaining some thing i've tried to do to get this working.

what i would like to happen, is when doing the tx.unbounded_send(), is for the returned message to be printed out.

it could just be that i'm not understanding something about how futures and/or streams are working.

let me know if you need any more information. thanks!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.