# Packages
No description provided by the author
No description provided by the author
No description provided by the author
Package GoWinHttp
------------------------------------------------------------------------------------------------
By:秦天 -> 2022/11/01
---------------------------------------- GoWinHttp ---------------------------------------------
GoWinHttp 是根据 WinHttp 特性仿制的
同一个请求访问之后,底层TCP不会端口连接
下次向相同地址发送数据直接发送,不用再次建立连接
优点 1.节省了建立连接的时间,2.如果是HTTPS请求也节省了握手的时间,3.对于大量对同一地址进行请求有很好的效果
缺点 可能增加内存开销,建议修改 自动清理时间来优化
特性-相当于自带TCP连接池。
Go自带的http (不具备获取conn功能,因为长链接得手动设置超时)网上可能有其他的,但是我没找到,就自己封装了一下,可能有BUG
其他语言的请求底层都有这个功能(测试方法很简单,连续请求10次,记录请求时间,你会发现第一次慢,后面几次的就快了)
还有就是Go自带的HTTP请求/响应 对象,会自动处理协议头大小写,必须要 不处理 大小写,不然客户端可能会异常
------------------------------------------------------------------------------------------------
!!!如果发现 GoWinHttp 不稳定,或者 有BUG,有能力的自行修复,或者替换为官方的http库!!!!
------------------------------------------------------------------------------------------------
By:秦天 -> 2022/11/01
------------------------------------------------------------------------------------------------
*/.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package websocket implements the WebSocket protocol defined in RFC 6455.