Alvaro Lopez Ortega wrote:

  Now, the throttler is connection based, but we have to support
  connections, resources and the server, so I would suggest to change
  it structure a little bit in order to make it more generic.


I agree !


  for each active connection {

      ret = cherokee_throttler_client_has_room (&server->throttler);
      if (ret != ret_ok) {
         /* The bandwidth limit has been reached
          */
         sent_connection_to_sleep();
      }

      [..]

      /* When the virtual server has been asigned
       */
      ret = cherokee_throttler_client_has_room (&vserver->throttler);
      if (ret != ret_ok) {
     sent_connection_to_sleep();
      }
/* If the connection is here, there was available bandwidth in
       * the virtual host, so let's take a look at the resource..
       */
      ret = cherokee_throttler_client_has_room (&entry->throttler);
      if (ret != ret_ok) {
         sent_connection_to_sleep();
      }

      /* Attend the connection, there weren't any applicable bandwidth
       * restriction.
       */
  }


Hmm, good ;)

  What do you think of it?  It is just an idea :-)


I think its nice and i'll give it a shot ;)

--
Diego Giagio
_______________________________________________
Cherokee mailing list
[email protected]
http://www.alobbs.com/cgi-bin/mailman/listinfo/cherokee

Reply via email to