func (s *Server) serveTCP(svr *http.Server, errC chan<- error, tls bool, log log.Logger) (err error) {
	defer func() { errC <- err }()
	ln, err := net.Listen("tcp", svr.Addr)
	if err != nil {
		return err
	}
	defer ln.Close()
	switch {
	case !tls:
		// NOOP
	case s.validHTTPAddr():
		ln, err = s.tlsListener(ln)
		if err != nil {
			return err
		}
	case len(s.TLSCertPEM) != 0, len(s.TLSKeyPEM) != 0:
		log.Printf("Ignoring certificate since PORT was specified, using automated certificate management.")
	}
	err = svr.Serve(ln) // BLOCKING
	return
}
// serveTCP runs the specified server on the TCP network, configuring tls if necessary.
// ServeTCP is closely derived from https://golang.org/src/net/http/server.go to allow key bytes rather than files
serveTCP runs the specified server on the TCP network, configuring tls if necessary.
// serveTCP runs the specified server on the TCP network configuring tls if necessary . // ServeTCP is closely derived from https : // golang . org / src / net / http / server . go to allow key bytes rather than files
func (s *Server) serveTCP(svr *http.Server, errC chan<- error, tls bool, log log.Logger) (err error) {
	defer func() { errC <- err }()
	ln, err := net.Listen("tcp", svr.Addr)
	if err != nil {
		return err
	}
	defer ln.Close()
	switch {
	case !tls:
	case s.validHTTPAddr():
		ln, err = s.tlsListener(ln)
		if err != nil {
			return err
		}
	case len(s.TLSCertPEM) != 0, len(s.TLSKeyPEM) != 0:
		log.Printf("Ignoring certificate since PORT was specified, using automated certificate management.")
	}
	err = svr.Serve(ln) 
	return
}
func ( s * Server ) serveTCP ( svr * http . Server , errC chan <- error , tls bool , log log . Logger ) ( err error ) { defer func ( ) { errC <- err } ( ) ln , err := net . Listen ( " " , svr . Addr ) if err != nil { return err } defer ln . Close ( ) switch { case ! tls : case s . validHTTPAddr ( ) : ln , err = s . tlsListener ( ln ) if err != nil { return err } case len ( s . TLSCertPEM ) != 0 , len ( s . TLSKeyPEM ) != 0 : log . Printf ( " " ) } err = svr . Serve ( ln ) return }
serveTCP runs the specified server on the TCP network, configuring tls if necessary.
serveTCP runs the specified server on the TCP network configuring tls if necessary .
// NOOP // BLOCKING