Forum Discussion
nested events?
Can you use nested events in iRules?
For example:
when SERVER_CONNECTED { set portInbound [string tolower [TCP::local_port]]
if { $portInbound = 9999} { blah } when HTTP_REQUEST {
if { $portInbound = 111} {
blah blah
}
}
}
1 Reply
- Kevin_Stewart
Employee
No you cannot, but further, these events operate in different contexts (client side vs. server side). A few considerations though:
-
You don't need [string tolower ] with a command that returns a number.
-
You're using the [TCP::local_port] command in the SERVER_CONNECTED event, but I'm assuming you mean the incoming listening port. If that's the case, this value would be available from the HTTP_REQUEST event.
-
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com