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

Method do_io_read

src/iocore/net/UnixNetVConnection.cc:212–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212VIO *
213UnixNetVConnection::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf)
214{
215 if (closed && !(c == nullptr && nbytes == 0 && buf == nullptr)) {
216 Error("do_io_read invoked on closed vc %p, cont %p, nbytes %" PRId64 ", buf %p", this, c, nbytes, buf);
217 return nullptr;
218 }
219 read.vio.op = VIO::READ;
220 read.vio.mutex = c ? c->mutex : this->mutex;
221 read.vio.cont = c;
222 read.vio.nbytes = nbytes;
223 read.vio.ndone = 0;
224 read.vio.vc_server = this;
225 if (buf) {
226 read.vio.set_writer(buf);
227 if (!read.enabled) {
228 read.vio.reenable();
229 }
230 } else {
231 read.vio.buffer.clear();
232 read.enabled = 0;
233 }
234 return &read.vio;
235}
236
237VIO *
238UnixNetVConnection::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *reader, bool owner)

Callers

nothing calls this directly

Calls 4

set_writerMethod · 0.80
ErrorClass · 0.50
reenableMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected