Will net/http conn pool keepalive use http2 PING ?

77 views
Skip to first unread message

chenguang zhang

unread,
Dec 4, 2023, 8:40:17 AM12/4/23
to golang-nuts
My requirement is to keep all connections to http2 server alive and the server requires PING frame to keep-alive. To keep it simple I would like to use net/http library. 

I notice net/http has the connection pool ( https://pkg.go.dev/net/http#Transport  ) and golang.org/x/net/http2 offers the keep-alive via PING frame(https://github.com/mitmproxy/mitmproxy/issues/5046).

I wonder if the net/http library uses http2pool and keep all conn via http2 PING. I cannot find the document specifying alse I would like to know how to test this feature.
Reply all
Reply to author
Forward
0 new messages