code: func (mux *Mux) Serve() error {
  	logger := log.New(mux.LogOutput, "", log.LstdFlags)
  
  	for {
  		// Handle incoming connections. Retry temporary errors.
  		conn, err := mux.ln.Accept()
  		if err, ok := err.(interface {
  			Temporary() bool
  		}); ok && err.Temporary() {
  			logger.Printf("tcp.Mux: temporary error: %s", err)
  			continue
  		}
  
  		// Other errors should close the muxer and wait for outstanding conns.
  		if err != nil {
  			mux.Close()
  			return err
  		}
  
  		// Hand off connection to a separate goroutine.
  		mux.wg.Add(1)
  		go func(conn net.Conn) {
  			defer mux.wg.Done()
  			if err := mux.handleConn(conn); err != nil {
  				conn.Close()
  				logger.Printf("tcp.Mux: %s", err)
  			}
  		}(conn)
  	}
  }
docs: // Serve handles connections from ln and multiplexes then across registered listener.