Change Server to contain a Vec of (ip, port) pairs to allow repeat listening

Expose Server::many for creating a Server that will listen on many (ip, port)
pairs.

Handler still receives a simple Iterator of (Request, Response) pairs.

This is a breaking change since it changes the representation of Listener,
but Handler and Server::http are unchanged in their API.

Fixes #7
This commit is contained in:
Jonathan Reem
2014-09-08 20:29:28 -07:00
parent 8e95d4bc42
commit c2d9e34376
3 changed files with 73 additions and 38 deletions

View File

@@ -9,6 +9,8 @@ extern crate url;
#[phase(plugin,link)] extern crate log;
#[cfg(test)] extern crate test;
extern crate "unsafe-any" as uany;
extern crate "move-acceptor" as macceptor;
extern crate intertwine;
pub use std::io::net::ip::{SocketAddr, IpAddr, Ipv4Addr, Ipv6Addr, Port};
pub use mimewrapper::mime;