Documentation ¶
Index ¶
- Constants
- Variables
- type MatchFunc
- type Mux
- func (mux *Mux) DefaultListener() net.Listener
- func (mux *Mux) Listen(priority int, needBytesNum uint32, fn MatchFunc) net.Listener
- func (mux *Mux) ListenHttp(priority int) net.Listener
- func (mux *Mux) ListenHttps(priority int) net.Listener
- func (mux *Mux) Serve() error
- func (mux *Mux) SetKeepAlive(keepAlive time.Duration)
Constants ¶
View Source
const ( // DefaultTimeout is the default length of time to wait for bytes we need. DefaultTimeout = 10 * time.Second )
Variables ¶
View Source
var ( HttpsNeedBytesNum uint32 = 1 HttpNeedBytesNum uint32 = 3 YamuxNeedBytesNum uint32 = 2 )
Functions ¶
This section is empty.
Types ¶
type MatchFunc ¶
type Mux ¶
type Mux struct {
// contains filtered or unexported fields
}
func (*Mux) DefaultListener ¶
func (*Mux) Serve ¶
Serve handles connections from ln and multiplexes then across registered listeners.
func (*Mux) SetKeepAlive ¶
Click to show internal directories.
Click to hide internal directories.