mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-28 01:32:57 +01:00
Allow to use std::net::TcpListener for HttpServer
This commit is contained in:
parent
24342fb745
commit
0bf29a522b
@ -17,6 +17,8 @@
|
||||
|
||||
* Allow client connection timeout to be set #108
|
||||
|
||||
* Allow to use std::net::TcpListener for HttpServer
|
||||
|
||||
|
||||
## 0.4.4 (2018-03-04)
|
||||
|
||||
|
@ -173,6 +173,14 @@ impl<H> HttpServer<H> where H: IntoHttpHandler + 'static
|
||||
self.sockets.keys().cloned().collect()
|
||||
}
|
||||
|
||||
/// Use listener for accepting incoming connection requests
|
||||
///
|
||||
/// HttpServer does not change any configuration for TcpListener,
|
||||
/// it needs to be configured before passing it to listen() method.
|
||||
pub fn listen(mut self, lst: net::TcpListener) {
|
||||
self.sockets.insert(lst.local_addr().unwrap(), lst);
|
||||
}
|
||||
|
||||
/// The socket address to bind
|
||||
///
|
||||
/// To mind multiple addresses this method can be call multiple times.
|
||||
|
Loading…
Reference in New Issue
Block a user