-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Description
Lines 106 to 128 in 7ac70c1
| /// let acceptor = tokio_rustls::LazyConfigAcceptor::new(rustls::server::Acceptor::default(), stream); | |
| /// tokio::pin!(acceptor); | |
| /// | |
| /// match acceptor.as_mut().await { | |
| /// Ok(start) => { | |
| /// let clientHello = start.client_hello(); | |
| /// let config = choose_server_config(clientHello); | |
| /// let stream = start.into_stream(config).await.unwrap(); | |
| /// // Proceed with handling the ServerConnection... | |
| /// } | |
| /// Err(err) => { | |
| /// if let Some(mut stream) = acceptor.take_io() { | |
| /// stream | |
| /// .write_all( | |
| /// format!("HTTP/1.1 400 Invalid Input\r\n\r\n\r\n{:?}\n", err) | |
| /// .as_bytes() | |
| /// ) | |
| /// .await | |
| /// .unwrap(); | |
| /// } | |
| /// } | |
| /// } | |
| /// # } |
There is seemingly some discussion on whether this should or shouldn't be possible in the library (#54) but probably we should remove the example if its intended to send alerts here (which does seem like reasonable behavior)
Metadata
Metadata
Assignees
Labels
No labels