MCPcopy
hub / github.com/fvbock/endless / Serve

Method Serve

endless.go:192–200  ·  view source on GitHub ↗

* 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

()

Source from the content-addressed store, hash-verified

190down the server.
191*/
192func (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/*
203ListenAndServe listens on the TCP network address srv.Addr and then calls Serve

Callers 2

ListenAndServeMethod · 0.95
ListenAndServeTLSMethod · 0.95

Calls 1

setStateMethod · 0.95

Tested by

no test coverage detected