We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ca128d commit 12da424Copy full SHA for 12da424
src/asynchronous/server.rs
@@ -171,6 +171,18 @@ impl Server {
171
Ok(())
172
}
173
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();
177
+ let delegate = ServerBuilder {
178
+ services,
179
+ streams: Arc::new(Mutex::new(HashMap::new())),
180
+ shutdown_waiter,
181
+ };
182
+ let conn = Connection::new(conn, delegate);
183
+ conn.run().await
184
+ }
185
+
186
pub async fn shutdown(&mut self) -> Result<()> {
187
self.stop_listen().await;
188
self.disconnect().await;
0 commit comments