Package httpstoppable provides ListenAndServe like http.ListenAndServe, but with ability to stop it.
Deprecated: Go 1.8 adds native support for stopping a server in net/http. Once 1.8 is out, net/http should be used instead. This package will be removed shortly thereafter.
ListenAndServe listens on the TCP network address addr and then calls Serve with handler to handle requests on incoming connections. Accepted connections are configured to enable TCP keep-alives. Handler is typically nil, in which case the http.DefaultServeMux is used.
When receiving from stop unblocks (because it's closed or a value is sent), listener is closed and ListenAndServe returns with nil error. Otherise, it always returns a non-nil error.