[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] How to limit http connections in libevent ?
If you are trying to limit the connection only, you can maintain a
internal counter for each process, and check current value during
accept callback.
On Sat, Jul 2, 2011 at 7:45 AM, Artyom Boyko <artyomboyko@xxxxxxxxx> wrote:
> Hi!
> I'm using libevent with N processes (i'm using fork).
>
> I need to limit connections/events per process. How can i do that ?
> The only way i know is to use setrlimit(RLIMIT_NOFILE, but is this the best
> way to do that ? What is going to happen, when limit is reached ? Is error
> will occur ?
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.