* Serve accepts incoming HTTP connections on the listener l, creating a new service goroutine for each. The service goroutines read requests and then call handler to reply to them. Handler is typically nil, in which case the DefaultServeMux is used. In addition to the stl Serve behaviour each conne
()
| 190 | down the server. |
| 191 | */ |
| 192 | func (srv *endlessServer) Serve() (err error) { |
| 193 | defer log.Println(syscall.Getpid(), "Serve() returning...") |
| 194 | srv.setState(STATE_RUNNING) |
| 195 | err = srv.Server.Serve(srv.EndlessListener) |
| 196 | log.Println(syscall.Getpid(), "Waiting for connections to finish...") |
| 197 | srv.wg.Wait() |
| 198 | srv.setState(STATE_TERMINATE) |
| 199 | return |
| 200 | } |
| 201 | |
| 202 | /* |
| 203 | ListenAndServe listens on the TCP network address srv.Addr and then calls Serve |
no test coverage detected