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

Method do_io_write

src/proxy/PluginVC.cc:285–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285VIO *
286PluginVC::do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *abuffer, bool owner)
287{
288 ink_assert(!closed);
289 ink_assert(magic == PLUGIN_VC_MAGIC_ALIVE);
290
291 if (abuffer) {
292 ink_assert(!owner);
293 write_state.vio.set_reader(abuffer);
294 } else {
295 write_state.vio.buffer.clear();
296 }
297
298 // Note: we set vio.op last because process_write_side looks at it to
299 // tell if the VConnection is active.
300 write_state.vio.mutex = c ? c->mutex : this->mutex;
301 write_state.vio.cont = c;
302 write_state.vio.nbytes = nbytes;
303 write_state.vio.ndone = 0;
304 write_state.vio.vc_server = (VConnection *)this;
305 write_state.vio.op = VIO::WRITE;
306
307 Dbg(dbg_ctl_pvc, "[%u] %s: do_io_write for %" PRId64 " bytes", core_obj->id, PVC_TYPE, nbytes);
308
309 // Since reentrant callbacks are not allowed on from do_io
310 // functions schedule ourselves get on a different stack
311 need_write_process = true;
312 setup_event_cb(0, &sm_lock_retry_event);
313
314 return &write_state.vio;
315}
316
317void
318PluginVC::reenable(VIO *vio)

Callers 7

_do_http_requestMethod · 0.45
httpConnectMethod · 0.45
sendRespMethod · 0.45
new_connectionMethod · 0.45
ascii_set_eventMethod · 0.45
ascii_incr_decr_eventMethod · 0.45

Calls 2

set_readerMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected