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

Function PassthruAccept

example/plugins/c-api/passthru/passthru.cc:278–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278static int
279PassthruAccept(TSCont /* cont */, TSEvent event, void *edata)
280{
281 EventArgument arg(edata);
282 PassthruSession *sp = new PassthruSession();
283
284 PassthruSessionDebug(sp, "accepting connection on vconn=%p event=%d", arg.vconn, event);
285 TSReleaseAssert(event == TS_EVENT_NET_ACCEPT);
286
287 // Start the client end of the IO. We delay starting the server end until
288 // we get the first read from the client end.
289 sp->client.vconn = arg.vconn;
290 sp->client.readio.read(arg.vconn, sp->contp);
291 sp->client.writeio.write(arg.vconn, sp->contp);
292
293 return TS_EVENT_NONE;
294}
295
296static TSReturnCode
297PassthruListen()

Callers

nothing calls this directly

Calls 2

readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected