nethttp server
net/http Server
Server
Server对象定义:
属性
类型
版本
解释
Addr
string
监听端口的地址
Handler
Handler
Server请求的处理对象
TLSConfig
*tls.Config
监听端口的tls配置
ReadTimeout
time.Duration
ReadHeaderTimeout
time.Duration
1.8
WriteTimeout
time.Duration
IdleTimeout
time.Duration
1.8
MaxHeaderBytes
int
TLSNextProto
map[string]func(*Server, *tls.Conn, Handler)
1.1
ConnState
func(net.Conn, ConnState)
1.3
ErrorLog
*log.Logger
1.3
BaseContext
func(net.Listener) context.Context
1.13
ConnContext
func(ctx context.Context, c net.Conn) context.Context
1.13
Server Method
Handler
Last updated
Was this helpful?