Go to: http.Server connection pool

I know that http.Client in Go has a connection pool in type Transport

But there is no transport in http.Server.

I want to access the server pool.

  • List of all connections
  • Close connections / remove them from the pool

Update

I study Go source code https://code.google.com/p/go/source/browse/src/pkg/net/http/server.go#1087

It seems that this function has the answer that there is no pool.

Can anyone know how to override this function? Should I create an open copy of the package?

+4
source share
2 answers
+2

EDIT: , http-, http-

: https://code.google.com/p/go/source/browse/src/pkg/net/http/transport.go

, :

idleConn
idleConnCh
reqConn

, , , .

, , .

CloseIdleConnections, CancelRequest - , , , , , .

, , " ". - (- , , ) , , (.. ). , Transport, http ( ).

+1

All Articles