Hi All,

I am working on simple socket proxy/filter. To overcome the limitation of
fd's per process, the main creates a semaphore, and forks after create
listen socket, then the one which gets semaphore will accept. When the
active process reaches this max connections, it unlocks the semaphore and
stops accepting so anther process will start to work.

My question is regarding reactive the first process, for now it checks
(can't wait since we need keep event_dispatch running) the semaphore
whenever closing a connection but I feel the code a little ugly (keep
checking in an event driven app). Can I get a libevent event for semaphore
notification, like the how the signal works.

Thanks in advance.

Cheers,

Arthur

_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users

Reply via email to