Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for closenotify (0.44 sec)

  1. src/net/http/server.go

    // It may be called from multiple goroutines.
    func (cr *connReader) handleReadError(_ error) {
    	cr.conn.cancelCtx()
    	cr.closeNotify()
    }
    
    // may be called from multiple goroutines.
    func (cr *connReader) closeNotify() {
    	res := cr.conn.curReq.Load()
    	if res != nil && !res.didCloseNotify.Swap(true) {
    		res.closeNotifyCh <- true
    	}
    }
    
    func (cr *connReader) Read(p []byte) (n int, err error) {
    	cr.lock()
    	if cr.inRead {
    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