Struct hyperlocal::UnixSocketServer [] [src]

pub struct UnixSocketServer;

A type that provides a factory interface for creating unix socket based hyper Servers

examples

 extern crate hyper;
 extern crate hyperlocal;

 let server = hyperlocal::UnixSocketServer::new(
     "path/to/socket"
 ).unwrap();
 let listening = server.handle(
     |_: hyper::server::Request, res: hyper::server::Response| {
         let _ = res.send(b"It's a Unix system. I know this.\n");
     }
 ).unwrap();

Methods

impl UnixSocketServer
[src]

fn new<P: AsRef<Path>>(p: P) -> Result<Server<UnixSocketListener>>

creates a new hyper Server from a unix socket path