This transformation takes place transform_buffer_event() handler
function, when the data from the upstream is completely copied into
the input buffer is by the continuation TSCont from write VIO.

In the transform_connect() function, there is a communication with the
remote server (socket call) as below.

    200   /* TODO: This only supports IPv4, probably should be changed at
some point, but
    201      it's an example ... */
    202   memset(&ip_addr, 0, sizeof(ip_addr));
    203   ip_addr.sin_family = AF_INET;
    204   ip_addr.sin_addr.s_addr = server_ip; /* Should be in network byte
order */
    205   ip_addr.sin_port = server_port;
    206   action = TSNetConnect(contp, (struct sockaddr const*)&ip_addr);
    207

I am not able to understand as this does not seems to be actually sending
data to the server over this socket. So when the response from socket
(server) is indeed received, where that data will be handled to send to the
proxy client?

Thanks,
/anil.

On Mon, Apr 29, 2013 at 12:58 AM, Anil J <[email protected]> wrote:

> Hi List,
>
> In the server transform example code, transform_connect() function invokes
> the (dummy) call to the remote server where the content is getting
> transformed. In real implementation of this functionality, will this call
> with the transformation server be synchronous or asynchronous?
>
> I am trying to understand, when the remote server returns the transformed
> content, how it will be handled to be put back into the HTTP response
> message? Can you please elaborate this part a bit?
>
> I also noted that the explanation given in developer's guide and the code
> are bit different.
>
> Thanks,
> Anil.
>
>

Reply via email to