4月 112021
 

 

连接状态:

相关代码: src/net/http/server.go

 

 

状态说明:

New: 从Accept拿到一个新连接后,连接被标记为New,并触发hook

Active: 对于http2,只要连接上有请求存在,就算是Active的

Idle: 请求处理完毕,处于keep-alive状态

Hijack: 连接被偷走了,自己不需要继续处理了,这种连接不会进入Close状态的,Hijack 是个终态

Close:连接已关闭

 

参考:

Golang Http 学习(一) Http Server 的实现 – SegmentFault 思否

 Posted by at 下午 4:28

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据