method Server.close
Stops listening and releases the server (after serve returned).
Example:
use std.http { Server, ServerConfig }
fn main() io, net {
match Server.bind(ServerConfig{ port: 0 }) {
Server s => {
s.close()
print("closed")
}
NetError _ => print("cannot bind")
}
}Output
closed
pub(api) move fn close()Since. 1.0.0-beta
Effects
none declared (pure unless the body says otherwise)
Defined in: std/http/http.oxl:4691