regnhttp is high performance http client (low level) example
go get -u github.com/xsxo/regnhttp
go get -u github.com/xsxo/regnhttp@latest
ConnectFunction (create connection with server before send requests)- Reuse Request & Response object instead of creating a new one
- Reuse the same buffer to Reducing pressure on The Garbage Collector by
sync.Pool - No Thread Race | No Data Lose (all objects operate independently)
- Full control of client buffer
cleint.WriteBufferSizeandclient.ReadBufferSize - Full control of connection
client.Connection&client.TLSConfig&client.NagleOff - Full control of objects buffer
Request(bufferSize)andRequest(Response) - Get the request & response as a raw
Request.Raw&Response.Raw
- need to know the response & response buffer size
- no support pool connections (to avoid keep save open dead connections)
- no support streaming requests
- no support compresser responses
! the regnhttp package is for normal requests & responses, not for full HTTP protocol support. For other use cases, net/http may be a better choice, as it fully supports the HTTP protocol