Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for closeNotify (4.73 sec)

  1. src/net/http/server.go

    // New code should use [Request.Context] instead.
    type CloseNotifier interface {
    	// CloseNotify returns a channel that receives at most a
    	// single value (true) when the client connection has gone
    	// away.
    	//
    	// CloseNotify may wait to notify until Request.Body has been
    	// fully read.
    	//
    	// After the Handler has returned, there is no guarantee
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
  2. src/net/http/serve_test.go

    	script := make(chan string, 2)
    	script <- "closenotify"
    	script <- "hijack"
    	close(script)
    	ts := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) {
    		plan := <-script
    		switch plan {
    		default:
    			panic("bogus plan; too many requests")
    		case "closenotify":
    			w.(CloseNotifier).CloseNotify() // discard result
    			w.Header().Set("X-Addr", r.RemoteAddr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
Back to top