trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Geffon <briangef...@gmail.com>
Subject Re: facing an issue with writing transform plugin
Date Mon, 03 Jul 2017 04:47:09 GMT
The C++ API is a good reference for writing transformation plugins.

Brian

On Sun, Jul 2, 2017, 20:49 Gaurav Bansal <zeebee48@gmail.com> wrote:

> 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
>

Mime
View raw message