We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e2f135 commit 71f250aCopy full SHA for 71f250a
src/server/mod.rs
@@ -204,6 +204,11 @@ impl<L: NetworkListener> Server<L> {
204
pub fn set_write_timeout(&mut self, dur: Option<Duration>) {
205
self.listener.set_write_timeout(dur);
206
}
207
+
208
+ /// Get the address that the server is listening on.
209
+ pub fn local_addr(&mut self) -> io::Result<SocketAddr> {
210
+ self.listener.local_addr()
211
+ }
212
213
214
impl Server<HttpListener> {
0 commit comments