Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for SetKeepAlivesEnabled (0.38 sec)

  1. src/net/http/httptest/server.go

    // requests on this server have completed.
    func (s *Server) Close() {
    	s.mu.Lock()
    	if !s.closed {
    		s.closed = true
    		s.Listener.Close()
    		s.Config.SetKeepAlivesEnabled(false)
    		for c, st := range s.conns {
    			// Force-close any idle connections (those between
    			// requests) and new connections (those which connected
    			// but never sent a request). StateNew connections are
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:26:10 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  2. src/net/http/serve_test.go

    	}
    
    	// SetKeepAlivesEnabled should discard idle conns.
    	ts.Config.SetKeepAlivesEnabled(false)
    
    	waitCondition(t, 10*time.Millisecond, func(d time.Duration) bool {
    		if conns := tr.IdleConnStrsForTesting(); len(conns) > 0 {
    			if d > 0 {
    				t.Logf("idle conns %v after SetKeepAlivesEnabled called = %q; waiting for empty", d, conns)
    			}
    			return false
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  3. src/net/http/server.go

    func (s *Server) shuttingDown() bool {
    	return s.inShutdown.Load()
    }
    
    // SetKeepAlivesEnabled controls whether HTTP keep-alives are enabled.
    // By default, keep-alives are always enabled. Only very
    // resource-constrained environments or servers in the process of
    // shutting down should disable them.
    func (srv *Server) SetKeepAlivesEnabled(v bool) {
    	if v {
    		srv.disableKeepAlives.Store(false)
    		return
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
  4. api/go1.3.txt

    pkg net/http, const StateIdle = 2
    pkg net/http, const StateIdle ConnState
    pkg net/http, const StateNew = 0
    pkg net/http, const StateNew ConnState
    pkg net/http, method (*Server) SetKeepAlivesEnabled(bool)
    pkg net/http, method (ConnState) String() string
    pkg net/http, type Client struct, Timeout time.Duration
    pkg net/http, type ConnState int
    pkg net/http, type Response struct, TLS *tls.ConnectionState
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 02 02:45:00 UTC 2014
    - 117K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*Server).ListenAndServeTLS", Method, 0},
    		{"(*Server).RegisterOnShutdown", Method, 9},
    		{"(*Server).Serve", Method, 0},
    		{"(*Server).ServeTLS", Method, 9},
    		{"(*Server).SetKeepAlivesEnabled", Method, 3},
    		{"(*Server).Shutdown", Method, 8},
    		{"(*Transport).CancelRequest", Method, 1},
    		{"(*Transport).Clone", Method, 13},
    		{"(*Transport).CloseIdleConnections", Method, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top