- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for LocalAddrContextKey (0.48 sec)
-
api/go1.7.txt
pkg net/http, type Transport struct, MaxIdleConns int pkg net/http, type Transport struct, MaxResponseHeaderBytes int64 pkg net/http, var ErrUseLastResponse error pkg net/http, var LocalAddrContextKey *contextKey pkg net/http, var ServerContextKey *contextKey pkg net/http/cgi, type Handler struct, Stderr io.Writer pkg net/http/httptest, func NewRequest(string, string, io.Reader) *http.Request
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 28 15:08:11 UTC 2016 - 13.6K bytes - Viewed (0) -
src/net/http/server.go
// type *Server. ServerContextKey = &contextKey{"http-server"} // LocalAddrContextKey is a context key. It can be used in // HTTP handlers with Context.Value to access the local // address the connection arrived on. // The associated value will be of type net.Addr. LocalAddrContextKey = &contextKey{"local-addr"} ) // A conn represents the server side of an HTTP connection.
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/serve_test.go
} func testServerContext_LocalAddrContextKey(t *testing.T, mode testMode) { ch := make(chan any, 1) cst := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) { ch <- r.Context().Value(LocalAddrContextKey) })) if _, err := cst.c.Head(cst.ts.URL); err != nil { t.Fatal(err) } host := cst.ts.Listener.Addr().String() got := <-ch if addr, ok := got.(net.Addr); !ok {
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
sc.serve() } func http2serverConnBaseContext(c net.Conn, opts *http2ServeConnOpts) (ctx context.Context, cancel func()) { ctx, cancel = context.WithCancel(opts.context()) ctx = context.WithValue(ctx, LocalAddrContextKey, c.LocalAddr()) if hs := opts.baseConfig(); hs != nil { ctx = context.WithValue(ctx, ServerContextKey, hs) } return } func (sc *http2serverConn) rejectConn(err http2ErrCode, debug string) {
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
{"Handler", Type, 0}, {"HandlerFunc", Type, 0}, {"Head", Func, 0}, {"Header", Type, 0}, {"Hijacker", Type, 0}, {"ListenAndServe", Func, 0}, {"ListenAndServeTLS", Func, 0}, {"LocalAddrContextKey", Var, 7}, {"MaxBytesError", Type, 19}, {"MaxBytesError.Limit", Field, 19}, {"MaxBytesHandler", Func, 18}, {"MaxBytesReader", Func, 0}, {"MethodConnect", Const, 6},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)