- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ResponseWriterConnForTesting (0.17 sec)
-
src/net/http/export_test.go
for _, pcs := range tr.idleConn { for _, pc := range pcs { pc.conn.Close() } } tr.idleMu.Unlock() } // ResponseWriterConnForTesting returns w's underlying connection, if w // is a regular *response ResponseWriter. func ResponseWriterConnForTesting(w ResponseWriter) (c net.Conn, ok bool) { if r, ok := w.(*response); ok { return r.conn.rwc, true } return nil, false }
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/transport_test.go
w.Write([]byte(r.RemoteAddr)) // Include the address of the net.Conn in addition to the RemoteAddr, // in case kernels reuse source ports quickly (see Issue 52450) if c, ok := ResponseWriterConnForTesting(w); ok { fmt.Fprintf(w, ", %T %p", c, c) } }) // testCloseConn is a net.Conn tracked by a testConnSet. type testCloseConn struct { net.Conn set *testConnSet }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 192.6K bytes - Viewed (0)