Gaurav Bansal
2017-07-03 03:49:43 UTC
hi all,
We are writing a transform plugin where we keep on sending the data to the
client (after performing some checks) as and when it is received from the
server. When the transaction is finished, we call the below api :
*TSContCall(TSVIOContGet(write_vio), TS_EVENT_VCONN_WRITE_COMPLETE,
write_vio);*
Using this api, we expect the hook-transform (similar to bnull_transform
here) function to get called with TS_EVENT_VCONN_WRITE_COMPLETE event and
connection getting closed because of code shown below (our code here is
same as bnull-transform code pasted below) :
*bnull_transform(TSCont contp, TSEvent event, void *edata
ATS_UNUSED){.... switch (event) {.... case
TS_EVENT_VCONN_WRITE_COMPLETE:
TSVConnShutdown(TSTransformOutputVConnGet(contp), 0, 1); break;*
But somehow the hook-transform function is getting called with
TS_EVENT_VCONN_WRITE_READY event (though we called the api with the
write-complete event). Can anyone please let me know what might be the
reason for this ? What can be done to avoid it ? Is there any other way to
close the connection rather than sending the write-complete event ?
thanks,
gaurav
We are writing a transform plugin where we keep on sending the data to the
client (after performing some checks) as and when it is received from the
server. When the transaction is finished, we call the below api :
*TSContCall(TSVIOContGet(write_vio), TS_EVENT_VCONN_WRITE_COMPLETE,
write_vio);*
Using this api, we expect the hook-transform (similar to bnull_transform
here) function to get called with TS_EVENT_VCONN_WRITE_COMPLETE event and
connection getting closed because of code shown below (our code here is
same as bnull-transform code pasted below) :
*bnull_transform(TSCont contp, TSEvent event, void *edata
ATS_UNUSED){.... switch (event) {.... case
TS_EVENT_VCONN_WRITE_COMPLETE:
TSVConnShutdown(TSTransformOutputVConnGet(contp), 0, 1); break;*
But somehow the hook-transform function is getting called with
TS_EVENT_VCONN_WRITE_READY event (though we called the api with the
write-complete event). Can anyone please let me know what might be the
reason for this ? What can be done to avoid it ? Is there any other way to
close the connection rather than sending the write-complete event ?
thanks,
gaurav