| 276 | } |
| 277 | |
| 278 | static int |
| 279 | PassthruAccept(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 | |
| 296 | static TSReturnCode |
| 297 | PassthruListen() |