- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for StateIdle (0.19 sec)
-
src/net/http/httptest/server.go
s.closeConn(c) } case http.StateActive: if oldState, ok := s.conns[c]; ok { if oldState != http.StateNew && oldState != http.StateIdle { panic("invalid state transition") } s.conns[c] = cs } case http.StateIdle: if oldState, ok := s.conns[c]; ok { if oldState != http.StateActive { panic("invalid state transition") } s.conns[c] = cs }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 17:26:10 UTC 2024 - 10.7K bytes - Viewed (0) -
src/net/http/export_test.go
return nil } func (s *Server) ExportAllConnsIdle() bool { s.mu.Lock() defer s.mu.Unlock() for c := range s.activeConn { st, unixSec := c.getState() if unixSec == 0 || st != StateIdle { return false } } return true } func (s *Server) ExportAllConnsByState() map[ConnState]int { states := map[ConnState]int{} s.mu.Lock() defer s.mu.Unlock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 17 21:11:57 UTC 2024 - 8.7K bytes - Viewed (0) -
src/net/http/httptest/server_test.go
if err != nil { t.Fatal(err) } return c } // Keep one connection in StateNew (connected, but not sending anything) cnew := dial() defer cnew.Close() // Keep one connection in StateIdle (idle after a request) cidle := dial() defer cidle.Close() cidle.Write([]byte("HEAD / HTTP/1.1\r\nHost: foo\r\n\r\n")) _, err := http.ReadResponse(bufio.NewReader(cidle), nil) if err != nil { t.Fatal(err)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 18 16:57:12 UTC 2024 - 7.4K bytes - Viewed (0) -
src/net/http/server.go
// Issue 22682: treat StateNew connections as if // they're idle if we haven't read the first request's // header in over 5 seconds. if st == StateNew && unixSec < time.Now().Unix()-5 { st = StateIdle } if st != StateIdle || unixSec == 0 { // Assume unixSec == 0 means it's a very new // connection, without state set yet. quiescent = false continue } c.rwc.Close()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 123.4K bytes - Viewed (0) -
api/go1.3.txt
pkg net/http, const StateClosed = 4 pkg net/http, const StateClosed ConnState pkg net/http, const StateHijacked = 3 pkg net/http, const StateHijacked ConnState 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
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 02 02:45:00 UTC 2014 - 117K bytes - Viewed (0) -
src/net/http/serve_test.go
} } wantLog(func() { mustGet(ts.URL + "/") mustGet(ts.URL + "/close") }, StateNew, StateActive, StateIdle, StateActive, StateClosed) wantLog(func() { mustGet(ts.URL + "/") mustGet(ts.URL+"/", "Connection", "close") }, StateNew, StateActive, StateIdle, StateActive, StateClosed) wantLog(func() { mustGet(ts.URL + "/hijack") }, StateNew, StateActive, StateHijacked)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 202K bytes - Viewed (0) -
src/net/http/h2_bundle.go
// Active means we read some data and anticipate a request. We'll // do another Active when we get a HEADERS frame. sc.setConnState(StateActive) sc.setConnState(StateIdle) if sc.srv.IdleTimeout > 0 { sc.idleTimer = sc.srv.afterFunc(sc.srv.IdleTimeout, sc.onIdleTimer) defer sc.idleTimer.Stop() } go sc.readFrames() // closed by defer sc.conn.Close above
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 364.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"Server.WriteTimeout", Field, 0}, {"ServerContextKey", Var, 7}, {"SetCookie", Func, 0}, {"StateActive", Const, 3}, {"StateClosed", Const, 3}, {"StateHijacked", Const, 3}, {"StateIdle", Const, 3}, {"StateNew", Const, 3}, {"StatusAccepted", Const, 0}, {"StatusAlreadyReported", Const, 7}, {"StatusBadGateway", Const, 0}, {"StatusBadRequest", Const, 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)