Proposed new watcher

Hongli Lai honglilai at
Fri Aug 13 16:21:08 CEST 2010

On Fri, Aug 13, 2010 at 4:17 PM, Alexey Khmara <alex.khmara at> wrote:
> Hello.
> I'm trying to use libev in WebSockets server, and was very surprised when
> found that for every fd I need to create distinct watcher. Most of my fds
> share callback and event mask, and, I think, it's very common scenario -
> when you have 100000 identical clients that are distinguished by fd. May be,
> it would be useful to add special type of callback for this situation? It
> will save memory and hardly can decrease speed.

Would that really help? A watcher is about 50 bytes. For 100000
clients you only need about 5 MB of memory.

More information about the libev mailing list