mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 15:07:42 +02:00
minimum viable rustls v0.21 support (#3112)
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
//! Sets up a WebSocket server over TCP and TLS.
|
||||
//! Sends a heartbeat message every 4 seconds but does not respond to any incoming frames.
|
||||
|
||||
extern crate tls_rustls as rustls;
|
||||
extern crate tls_rustls_021 as rustls;
|
||||
|
||||
use std::{
|
||||
io,
|
||||
@ -28,7 +28,9 @@ async fn main() -> io::Result<()> {
|
||||
HttpService::build().h1(handler).tcp()
|
||||
})?
|
||||
.bind("tls", ("127.0.0.1", 8443), || {
|
||||
HttpService::build().finish(handler).rustls(tls_config())
|
||||
HttpService::build()
|
||||
.finish(handler)
|
||||
.rustls_021(tls_config())
|
||||
})?
|
||||
.run()
|
||||
.await
|
||||
|
Reference in New Issue
Block a user