经常在代码里面看到多路复用,那什么是多路复用?
...
ServeMux is an HTTP request multiplexer.
...
type ServeMux struct {
mu sync.RWMutex
m map[string]muxEntry
es []muxEntry // slice of entries sorted from longest to shortest.
hosts bool // whether any patterns contain hostnames
}
什么样的情况下,才算是多路复用?
推荐文章: