Hi, I have written a plugin that intercepts HTTP requests by using TSHttpTxnIntercept and then reads the request and scans it. If it is allowed then I open a connection to the server by using TSNetConnect and send the request on.
I have two problems: 1. By using TSNetConnect I bypass Traffic Server's connection pooling so I have to implement my own by not closing the server connection at the end of each transaction in case the next transaction needs to reuse it. It would be better if I could somehow get the NetConnect to use the connection pooling. 2. I cannot detect when the TSVConn server connection closes. This has the effect of quite a few sockets being left in a CLOSED_WAIT state for a while because the server closes the connection but I do not detect this and only close the TSVConn connection to the server when the session closes down. Has anyone got any ideas? Do you think I need to change the Traffic Server source code to either provide some event that is called when a TSVConn closes, or change the code so there is a function I can call that will return the state of a TSVConn - e.g. like TSVConnClosedGet (which can only be used for transformation TSVConns) - and then schedule an event to check for this periodically? Thank-you, Chris.