MCPcopy Create free account
hub / github.com/apache/trafficserver / drainReader

Method drainReader

plugins/slice/Stage.h:43–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 }
42
43 int64_t
44 drainReader()
45 {
46 int64_t consumed = 0;
47
48 if (nullptr != m_reader && reader_avail_more_than(m_reader, 0)) {
49 int64_t const avail = TSIOBufferReaderAvail(m_reader);
50 TSIOBufferReaderConsume(m_reader, avail);
51 consumed = avail;
52 if (nullptr != m_vio) {
53 TSVIONDoneSet(m_vio, TSVIONDoneGet(m_vio) + consumed);
54 }
55 }
56
57 return consumed;
58 }
59
60 bool
61 setForRead(TSVConn vc, TSCont contp, int64_t const bytesin)

Callers

nothing calls this directly

Calls 5

reader_avail_more_thanFunction · 0.85
TSIOBufferReaderAvailFunction · 0.85
TSVIONDoneSetFunction · 0.85
TSVIONDoneGetFunction · 0.85
TSIOBufferReaderConsumeFunction · 0.50

Tested by

no test coverage detected