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")
}
}Вывод
closed
pub(api) move fn close()С версии. 1.0.0-beta
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/http/http.oxl:4691