func TCP(addr string) (net.Listener, error) {
	l, err := net.Listen("tcp", addr)
	if err != nil {
		return nil, err
	}
	return l, nil
}
TCP returns a new tcp(ipv6 if supported by network) and an error on failure.
package netutil
import (
	"crypto/tls"
	"net"
	"os"
	"strings"
	"time"
	"github.com/kataras/iris/core/errors"
	"golang.org/x/crypto/acme/autocert"
)
type tcpKeepAliveListener struct {
	*net.TCPListener
}
func (l tcpKeepAliveListener) Accept() (c net.Conn, err error) {
	tc, err := l.AcceptTCP()
	if err != nil {
		return
	}
	tc.SetKeepAlive(true)
	tc.SetKeepAlivePeriod(3 * time.Minute)
	return tc, nil
}
var (
	errPortAlreadyUsed = errors.New("port is already used")
	errRemoveUnix      = errors.New("unexpected error when trying to remove unix socket file. Addr: %s | Trace: %s")
	errChmod           = errors.New("cannot chmod %#o for %q: %s")
	errCertKeyMissing  = errors.New("you should provide certFile and keyFile for TLS/SSL")
	errParseTLS        = errors.New("couldn't load TLS, certFile=%q, keyFile=%q. Trace: %s")
)