Replies: 2 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
So, first you need to make let on_req_upgrade = hyper::upgrade::on(&mut req);
// ...
let mut resp = sender.send_request(req).await?;
tokio::task::spawn(async move {
let _upgraded_req = on_req_upgrade.await;
let _upgraded_resp = hyper::upgrade::on(&mut resp).await;
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to copy Request for useing sender.send_request and hyper::upgrade::on for web soket proxy at the same time
and return BAD_GATEWAY if
let client_stream = TcpStream::connect(addr).await.unwrap();
return err ?my code
Beta Was this translation helpful? Give feedback.
All reactions