| 1018 | } |
| 1019 | |
| 1020 | static int |
| 1021 | synserver_txn_write_response_handler(TSCont contp, TSEvent event, void * /* data ATS_UNUSED */) |
| 1022 | { |
| 1023 | ServerTxn *txn = static_cast<ServerTxn *>(TSContDataGet(contp)); |
| 1024 | TSAssert(txn->magic == MAGIC_ALIVE); |
| 1025 | |
| 1026 | switch (event) { |
| 1027 | case TS_EVENT_VCONN_WRITE_READY: |
| 1028 | Dbg(dbg_ctl_SockServer, "WRITE_READY"); |
| 1029 | TSVIOReenable(txn->write_vio); |
| 1030 | break; |
| 1031 | |
| 1032 | case TS_EVENT_VCONN_WRITE_COMPLETE: |
| 1033 | Dbg(dbg_ctl_SockServer, "WRITE_COMPLETE"); |
| 1034 | TSVConnShutdown(txn->vconn, 0, 1); |
| 1035 | return synserver_txn_close(contp); |
| 1036 | break; |
| 1037 | |
| 1038 | case TS_EVENT_VCONN_EOS: |
| 1039 | Dbg(dbg_ctl_SockServer, "WRITE_EOS"); |
| 1040 | return synserver_txn_close(contp); |
| 1041 | break; |
| 1042 | |
| 1043 | case TS_EVENT_ERROR: |
| 1044 | Dbg(dbg_ctl_SockServer, "WRITE_ERROR"); |
| 1045 | return synserver_txn_close(contp); |
| 1046 | break; |
| 1047 | |
| 1048 | default: |
| 1049 | TSAssert(!"Invalid event"); |
| 1050 | break; |
| 1051 | } |
| 1052 | return TS_EVENT_IMMEDIATE; |
| 1053 | } |
| 1054 | |
| 1055 | static int |
| 1056 | synserver_txn_read_request(TSCont contp) |
nothing calls this directly
no test coverage detected