Serve sets up the handler to serve requests on the passed in listener
(l net.Listener)
| 30 | |
| 31 | // Serve sets up the handler to serve requests on the passed in listener |
| 32 | func (h Handler) Serve(l net.Listener) error { |
| 33 | server := http.Server{ |
| 34 | Addr: l.Addr().String(), |
| 35 | Handler: h.mux, |
| 36 | } |
| 37 | return server.Serve(l) |
| 38 | } |
| 39 | |
| 40 | // ServeTCP makes the handler to listen for request in a given TCP address. |
| 41 | // It also writes the spec file in the right directory for docker to read. |
no outgoing calls