func New(l net.Listener) CMux {
	return &cMux{
		root:   l,
		bufLen: 1024,
		errh:   func(_ error) bool { return true },
		donec:  make(chan struct{}),
	}
}
New instantiates a new connection multiplexer.
package cmux
import (
	"bytes"
	"fmt"
	"io"
	"net"
	"sync"
)
type Matcher func(io.Reader) bool
type ErrorHandler func(error) bool
var _ net.Error = ErrNotMatched{}
type ErrNotMatched struct {
	c net.Conn
}
func (e ErrNotMatched) Error() string {
	return fmt.Sprintf("mux: connection %v not matched by an matcher",
		e.c.RemoteAddr())
}
func (e ErrNotMatched) Temporary() bool { return true }
func (e ErrNotMatched) Timeout() bool { return false }
type errListenerClosed string
func (e errListenerClosed) Error() string   { return string(e) }
func (e errListenerClosed) Temporary() bool { return false }
func (e errListenerClosed) Timeout() bool   { return false }
var ErrListenerClosed = errListenerClosed("mux: listener closed")