[Kamailio-Devel] SF.net SVN: openser:[5764] trunk
Jan Janak
jan at ryngle.com
Thu Mar 26 13:07:19 CET 2009
On 25-03 18:35, Ovidiu Sas wrote:
> Hello Jan,
>
> Those functions are exporting statistics related to the socket (the
> number of bytes in the socket queue).
> The ratelimit module has a new algorithm which relies on the number of
> bytes in a socket queue.
> If the number of bytes waiting in the queue is reaching the limit, the
> server can reject incoming requests.
> More info here:
> http://openser.svn.sourceforge.net/openser/?rev=5765&view=rev
>
> The code was simply moved from the snmpstats module into the socket files.
> Statistics belonging to the sockets should not belong to a particular
> module, as other modules may need to use it (in my case: ratelimit).
> That was the reason for moving the particular piece of code into the
> core socket file.
OK, but I think that it would be better to put it in a separate file or in
statistics.h, socket_info.c contains functions that work with the internal
socket_info structure.
> Is there a specific place to compute statistics in sr core?. If yes,
> we should move the code there and expose it to all the modules that
> are requesting it.
In sr I'll have to put in libkcore now. However as I do not want to invent
another socket_info.h in the library, I'll store it either in a separate file
or in libkcore/statistics.[ch].
Jan.
More information about the Devel
mailing list