code: func WSSListener(addr string, tlsConfig *tls.Config, options *WSOptions) (Listener, error) {
  	tcpAddr, err := net.ResolveTCPAddr("tcp", addr)
  	if err != nil {
  		return nil, err
  	}
  	if options == nil {
  		options = &WSOptions{}
  	}
  	l := &wssListener{
  		wsListener: &wsListener{
  			upgrader: &websocket.Upgrader{
  				ReadBufferSize:    options.ReadBufferSize,
  				WriteBufferSize:   options.WriteBufferSize,
  				CheckOrigin:       func(r *http.Request) bool { return true },
  				EnableCompression: options.EnableCompression,
  			},
  			connChan: make(chan net.Conn, 1024),
  			errChan:  make(chan error, 1),
  		},
  	}
  
  	if tlsConfig == nil {
  		tlsConfig = DefaultTLSConfig
  	}
  
  	path := options.Path
  	if path == "" {
  		path = defaultWSPath
  	}
  
  	mux := http.NewServeMux()
  	mux.Handle(path, http.HandlerFunc(l.upgrade))
  	l.srv = &http.Server{
  		Addr:              addr,
  		TLSConfig:         tlsConfig,
  		Handler:           mux,
  		ReadHeaderTimeout: 30 * time.Second,
  	}
  
  	ln, err := net.ListenTCP("tcp", tcpAddr)
  	if err != nil {
  		return nil, err
  	}
  	l.addr = ln.Addr()
  
  	go func() {
  		err := l.srv.Serve(tls.NewListener(tcpKeepAliveListener{ln}, tlsConfig))
  		if err != nil {
  			l.errChan <- err
  		}
  		close(l.errChan)
  	}()
  	select {
  	case err := <-l.errChan:
  		return nil, err
  	default:
  	}
  
  	return l, nil
  }
docs: // WSSListener creates a Listener for websocket secure proxy server.