Maj*_*eri 5 iron unix-socket rust
我有一个来自ironframework.io 的简单示例:
extern crate iron;
use iron::prelude::*;
use iron::status;
fn main() {
fn hello_world(_: &mut Request) -> IronResult<Response> {
Ok(Response::with((status::Ok, "Hello World!")))
}
// below code
let _server = Iron::new(hello_world).http("localhost:3000").unwrap();
println!("On 3000");
}
Run Code Online (Sandbox Code Playgroud)
我希望服务器侦听 Unix 域套接字 (UDS)。
归档时间: |
|
查看次数: |
171 次 |
最近记录: |