File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -171,16 +171,13 @@ impl Server {
171171 Ok ( ( ) )
172172 }
173173
174- pub async fn start_connected ( & mut self , conn : Socket ) -> std:: io:: Result < ( ) > {
175- let services = self . services . clone ( ) ;
176- let shutdown_waiter = self . shutdown . subscribe ( ) ;
174+ pub fn accept ( & mut self , conn : Socket ) -> Connection < impl Builder > {
177175 let delegate = ServerBuilder {
178- services,
179- streams : Arc :: new ( Mutex :: new ( HashMap :: new ( ) ) ) ,
180- shutdown_waiter,
176+ services : self . services . clone ( ) ,
177+ streams : Arc :: default ( ) ,
178+ shutdown_waiter : self . shutdown . subscribe ( ) ,
181179 } ;
182- let conn = Connection :: new ( conn, delegate) ;
183- conn. run ( ) . await
180+ Connection :: new ( conn, delegate)
184181 }
185182
186183 pub async fn shutdown ( & mut self ) -> Result < ( ) > {
You can’t perform that action at this time.
0 commit comments