MCPcopy Index your code
hub / github.com/apache/tomcat / receive

Method receive

java/org/apache/coyote/ajp/AjpProcessor.java:526–549  ·  view source on GitHub ↗

Read an AJP body message. Used to read both the 'special' packet in ajp13 and to receive the data after we send a GET_BODY packet. @param block If there is no data available to read when this method is called, should this call block until data becomes available? @return true

(boolean block)

Source from the content-addressed store, hash-verified

524 * @return <code>true</code> if at least one body byte was read, otherwise <code>false</code>
525 */
526 private boolean receive(boolean block) throws IOException {
527
528 bodyMessage.reset();
529
530 if (!readMessage(bodyMessage, block)) {
531 return false;
532 }
533
534 waitingForBodyMessage = false;
535
536 // No data received.
537 if (bodyMessage.getLen() == 0) {
538 // just the header
539 return false;
540 }
541 int blen = bodyMessage.peekInt();
542 if (blen == 0) {
543 return false;
544 }
545
546 bodyMessage.getBodyBytes(bodyBytes);
547 empty = false;
548 return true;
549 }
550
551
552 /**

Callers 1

refillReadBufferMethod · 0.95

Calls 5

readMessageMethod · 0.95
getLenMethod · 0.80
peekIntMethod · 0.80
getBodyBytesMethod · 0.80
resetMethod · 0.65

Tested by

no test coverage detected