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 <artyombo...@gmail.com> 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 majord...@freehaven.net with unsubscribe libevent-users in the body.