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

Method do_io_read

src/proxy/PluginVC.cc:254–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254VIO *
255PluginVC::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf)
256{
257 ink_assert(!closed);
258 ink_assert(magic == PLUGIN_VC_MAGIC_ALIVE);
259
260 if (buf) {
261 read_state.vio.set_writer(buf);
262 } else {
263 read_state.vio.buffer.clear();
264 }
265
266 // Note: we set vio.op last because process_read_side looks at it to
267 // tell if the VConnection is active.
268 read_state.vio.mutex = c ? c->mutex : this->mutex;
269 read_state.vio.cont = c;
270 read_state.vio.nbytes = nbytes;
271 read_state.vio.ndone = 0;
272 read_state.vio.vc_server = (VConnection *)this;
273 read_state.vio.op = VIO::READ;
274
275 Dbg(dbg_ctl_pvc, "[%u] %s: do_io_read for %" PRId64 " bytes", core_obj->id, PVC_TYPE, nbytes);
276
277 // Since reentrant callbacks are not allowed on from do_io
278 // functions schedule ourselves get on a different stack
279 need_read_process = true;
280 setup_event_cb(0, &sm_lock_retry_event);
281
282 return &read_state.vio;
283}
284
285VIO *
286PluginVC::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *abuffer, bool owner)

Callers 9

_do_http_requestMethod · 0.45
httpConnectMethod · 0.45
ioCompletionEventMethod · 0.45
mainEventMethod · 0.45
acceptEventMethod · 0.45
new_connectionMethod · 0.45
ascii_get_eventMethod · 0.45
ascii_set_eventMethod · 0.45

Calls 2

set_writerMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected