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

Method process_fetch_write

src/proxy/FetchSM.cc:580–606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578}
579
580void
581FetchSM::process_fetch_write(int event)
582{
583 Dbg(dbg_ctl, "[%s] calling process write", __FUNCTION__);
584 switch (event) {
585 case TS_EVENT_VCONN_WRITE_COMPLETE:
586 req_finished = true;
587 break;
588 case TS_EVENT_VCONN_WRITE_READY:
589 // data is processed in chunks of 32k; if there is more than 32k
590 // of input data, we have to continue reenabling until all data is
591 // read (we have already written all the data to the buffer)
592 if (req_reader->read_avail() > 0) {
593 ((PluginVC *)http_vc)->reenable(write_vio);
594 }
595 break;
596 case TS_EVENT_ERROR:
597 if (fetch_flags & TS_FETCH_FLAGS_STREAM) {
598 return InvokePluginExt(event);
599 }
600 InvokePlugin(callback_events.failure_event_id, nullptr);
601 cleanUp();
602 break;
603 default:
604 break;
605 }
606}
607
608int
609FetchSM::fetch_handler(int event, void *edata)

Callers

nothing calls this directly

Calls 3

cleanUpFunction · 0.85
read_availMethod · 0.45
reenableMethod · 0.45

Tested by

no test coverage detected