Forum Discussion
Nicolas_Menant
Employee
Apr 10, 2008Retrieve number of current connections ?
Hi,
i developp an iControl api that will interact with the servers depending on the number of connection on each.
I have some issue to retrieve the number of current connections o...
Don_MacVittie_1
Apr 10, 2008Historic F5 Account
Hi nmenant!
The return value is 64 bits long, so we return it as two 32 bit numbers. Looks like you're using C, here's a thread that discusses this topic for C and VB: http://devcentral.f5.com/Default.aspx?tabid=53&forumid=1&postid=15946&view=topic
For your other code snippet, no, the problem is cropping up because you don't have curly braces around the if statements - so the for is only working on the first one, not the second.
If you change the for statement to be for(...) {
and then close the curly-brace after the second if statement, you'll be good.
The reason you're getting that specific error is because the for runs, checking only the first if statement, and when the for loop is finished the value of j is mbstat[0].statistics[1].statistics.Length, which is indeed outside the bounds since the bounds of a C array are 0..Length-1
I do hope that makes sense and I didn't belabor the point.
Regards,
Don.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
