- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for tcpNone (0.39 sec)
-
src/net/http/server.go
} // ReadFrom is here to optimize copying from an [*os.File] regular file // to a [*net.TCPConn] with sendfile, or from a supported src type such // as a *net.TCPConn on Linux with splice. func (w *response) ReadFrom(src io.Reader) (n int64, err error) { buf := getCopyBuf() defer putCopyBuf(buf) // Our underlying w.conn.rwc is usually a *TCPConn (with its // own ReadFrom method). If not, just fall back to the normal // copy method.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 123.4K bytes - Viewed (0) -
src/net/http/transport_test.go
conn, err := d.DialContext(ctx, network, addr) if err != nil { return nil, err } tcpConn, ok := conn.(*net.TCPConn) if !ok { return nil, fmt.Errorf("%s/%s does not provide a *net.TCPConn", network, addr) } tConn.TCPConn = tcpConn return tConn, nil } } cst := newClientServerTest( t, mode,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 192.6K bytes - Viewed (0) -
src/net/http/serve_test.go
if err != nil { t.Errorf("Hijack in Handler: %v", err) return } if _, ok := c.(*net.TCPConn); !ok { // Verify it's not wrapped in some type. // Not strictly a go1 compat issue, but in practice it probably is. t.Errorf("type of hijacked conn is %T; want *net.TCPConn", c) } fmt.Fprintf(c, "HTTP/1.0 200 OK\r\nX-Addr: %v\r\nContent-Length: 0\r\n\r\n", r.RemoteAddr) c.Close()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 202K bytes - Viewed (0)