Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for sendResponse (0.18 sec)

  1. src/net/http/filetransport.go

    	wroteHeader  bool
    	hasContent   bool
    	sentResponse bool
    	pw           *io.PipeWriter
    }
    
    func (pr *populateResponse) finish() {
    	if !pr.wroteHeader {
    		pr.WriteHeader(500)
    	}
    	if !pr.sentResponse {
    		pr.sendResponse()
    	}
    	pr.pw.Close()
    }
    
    func (pr *populateResponse) sendResponse() {
    	if pr.sentResponse {
    		return
    	}
    	pr.sentResponse = true
    
    	if pr.hasContent {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/MockStreamHandler.kt

            try {
              stream.requestBody.exhausted()
              throw AssertionError("expected IOException")
            } catch (expected: IOException) {
            }
          }
        }
    
      @JvmOverloads
      fun sendResponse(
        s: String,
        responseSent: CountDownLatch = CountDownLatch(0),
      ) = apply {
        actions += { stream ->
          stream.responseBody.writeUtf8(s)
          stream.responseBody.flush()
          responseSent.countDown()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  3. src/net/textproto/pipeline.go

    // the request with the given id.
    func (p *Pipeline) StartResponse(id uint) {
    	p.response.Start(id)
    }
    
    // EndResponse notifies p that the response with the given id has been received
    // (or, if this is a server, sent).
    func (p *Pipeline) EndResponse(id uint) {
    	p.response.End(id)
    }
    
    // A sequencer schedules a sequence of numbered events that must
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 08 16:19:51 UTC 2020
    - 3K bytes
    - Viewed (0)
  4. src/net/textproto/textproto.go

    // Cmd returns the id of the command, for use with StartResponse and EndResponse.
    //
    // For example, a client might run a HELP command that returns a dot-body
    // by using:
    //
    //	id, err := c.Cmd("HELP")
    //	if err != nil {
    //		return nil, err
    //	}
    //
    //	c.StartResponse(id)
    //	defer c.EndResponse(id)
    //
    //	if _, _, err = c.ReadCodeLine(110); err != nil {
    //		return nil, err
    //	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  5. internal/grid/muxserver.go

    			case <-m.ctx.Done():
    				return
    			case handlerIn <- in:
    				m.send(message{Op: OpUnblockClMux, MuxID: m.ID, Flags: c.baseFlags})
    			}
    		}
    	}
    }
    
    // sendResponses will send responses to the client.
    func (m *muxServer) sendResponses(ctx context.Context, toSend <-chan []byte, c *Connection, handlerErr *atomic.Pointer[RemoteErr], outBlock <-chan struct{}) {
    	for {
    		// Process outgoing message.
    		var payload []byte
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 9.7K bytes
    - Viewed (0)
Back to top