tokio_util::either::Either for handshake Io #68
Answered
by
Antiarchitect
Antiarchitect
asked this question in
Q&A
-
Trying to use one handshake callback for both TlsStream and TcpStream via tokio_util::either::Either:
Successfully mapped io into Either::Left in case of Tls, but cannot do the same in case of Tcp server. Do not know how. |
Beta Was this translation helpful? Give feedback.
Answered by
Antiarchitect
Oct 15, 2021
Replies: 2 comments 6 replies
-
Found the solution:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Antiarchitect
-
can't you just use async fn handshake(handshake: v3::Handshake<T>) -> Result<v3::HandshakeAck<T, ClientSession>, ServerError> {
...
} |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found the solution: