On Mon, Mar 20, 2017 at 8:44 AM, Sakthivel Subramaniam
<sakthive...@aximsoft.com> wrote:
> Hi,


Could you please avoid:
- using html in your messages
- edit Cc:/To:
- and top-posting

> 1. currently I'm using event_free() for cleaning events. Is this fine or any
> other call is available to remove particular event?

Why do you need more if you already have one API for this?

But here are some differences between event_free() and event_del():

And also worth reading:

> 2. When I try to create an event with event_new() of a socket id(accepted
> client ), in-case already event was created for same socket id. Why
> event_new is not throwing any error and its creating new event with that id
> again?

event_new() does not add any events for monitoring, it just prepares
the structure.

event_add() is the one that actually adds event for monitoring, but
anyway it doesn't return an error, and indeed epoll for instance
doesn't allow monitoring the same fd twice (EEXIST), libevent accept
it, and the reason I can come up with, to trigger multiple callbacks
for the activity on one fd, to avoid hooking into first added

BTW it was changed long time ago in 1.1:
To unsubscribe, send an e-mail to majord...@freehaven.net with
unsubscribe libevent-users    in the body.

Reply via email to