File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1717use futures_util:: stream:: { FuturesUnordered , Stream , StreamExt } ;
1818use pin_project_lite:: pin_project;
1919use std:: future:: Future ;
20- use std:: io;
2120use std:: marker:: Unpin ;
2221use std:: pin:: Pin ;
2322use std:: task:: { Context , Poll } ;
2423use std:: time:: Duration ;
24+ use std:: { io, mem} ;
2525use thiserror:: Error ;
2626use tokio:: io:: { AsyncRead , AsyncWrite } ;
2727use tokio:: time:: { timeout, Timeout } ;
@@ -136,6 +136,13 @@ where
136136 pub fn accept ( & mut self ) -> impl Future < Output = Option < <Self as Stream >:: Item > > + ' _ {
137137 self . next ( )
138138 }
139+
140+ /// Replaces the Tls Acceptor configuration, which will be used for new connections.
141+ ///
142+ /// This can be used to change the certificate used at runtime.
143+ pub fn replace_acceptor ( & mut self , acceptor : T ) {
144+ self . tls = acceptor;
145+ }
139146}
140147
141148impl < A , T > Stream for TlsListener < A , T >
You can’t perform that action at this time.
0 commit comments