Forum Discussion
vinny_murphy_96
Mar 31, 2005Nimbostratus
Thanks, Matt, Jason,
Jason, I was following your issue with the MSRDP and found it indeed very interesting and was myself quite impressed by the powers of iRules.
However another question rather basic perhaps ?
Can you guys tell me what happens in the case of the first TCP::collect, does this execute indefinitely for a TCP connection seen as the TCP::release is for the inner event :
===========================================================
Do not declare the rule in the script this is just for clarity
rule NonKeep-alivePersistence {
Rule entry point
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
TCP::collect 25
log local0. "persisting:"
set hashKey [findstr [TCP::payload] "X-Client-IP" 13 "\r"]
if the hashKey is not equal to a whitespace/delimiter
if {$hashKey ne ""} {
persist uie $hashKey 1200
pool TestPool
log local0. "Key to persist: $hashKey"
}
Flush collect data and release event hook point
TCP::release
}
}
Finally and most importantly the event ClIENT_DATA when used without CLIENT_ACCEPTED does not seem to turn on its own. I got nothing in the snoop or the logs. Can I use CLIENT_DATA to check the data payload of a TCP connection without executing the event on the connection set-up (CLIENT_ACCEPTED) Of course this is crucial if I want to use keep-alive.
Thanks,
Vin.