Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultTimeout Default Header timeout DefaultTimeout = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Mux ¶
type Mux struct { // Receive Header timeout Timeout time.Duration // Out-of-band error logger Logger *log.Logger // contains filtered or unexported fields }
Mux Reusable connections
func (*Mux) DefaultListener ¶
DefaultListener 创建默认的 net.Listener 监听器实例,用于处理未注册 Header 字节的连接。 读取数据时,之前已被读取的 Header 字节将会被重新读取。
注册该默认监听器实例时,需要确保请求报文的起始字节与其他已注册 Header 字节的监听器之间没有冲突, 如 GET 请求中的 71 ('G')
Click to show internal directories.
Click to hide internal directories.