This function is to call proper functions according to the VIO argument. If it's read_vio, which means reading request from client_vc, call state_read_request_from_client. If it's write_vio, which means sending response to client_vc, call state_send_response_to_client. If the event is TS_EVENT_VCONN_EOS, which means the client closed socket and thus implies the client drop all jo
| 188 | which means the client closed socket and thus implies the client |
| 189 | drop all jobs between TxnSM and the client, so go to die. */ |
| 190 | int |
| 191 | state_interface_with_client(TSCont contp, TSEvent event, TSVIO vio) |
| 192 | { |
| 193 | TxnSM *txn_sm = static_cast<TxnSM *>(TSContDataGet(contp)); |
| 194 | |
| 195 | Dbg(dbg_ctl, "enter state_interface_with_client"); |
| 196 | |
| 197 | txn_sm->q_pending_action = nullptr; |
| 198 | |
| 199 | if (vio == txn_sm->q_client_read_vio) { |
| 200 | return state_read_request_from_client(contp, event, vio); |
| 201 | } |
| 202 | |
| 203 | /* vio == txn_sm->q_client_write_vio */ |
| 204 | return state_send_response_to_client(contp, event, vio); |
| 205 | } |
| 206 | |
| 207 | /* Data is read from client_vc, if all data for the request is in, |
| 208 | parse it and do cache lookup. */ |
nothing calls this directly
no test coverage detected