ListenAndServe

ListenAndServe listens for the TCP addr network address and then calls the server with a handler to handle requests on incoming connections. Accepted connections are configured to enable keep-alives TCP.


func ListenAndServe(addr string, handler Handler) error
                        

The handler is normally null, in which case DefaultServeMux is used.

ListenAndServe always returns a non-null error.

listen_and_serve.go