[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] Stateful protocol fix



I think I need a function named bufferevent_free_setcb().  It would run after all of the other queued events for the fd.

I have a stateful protocol, and when I ditch a connection with bufferevent_free(), callbacks still run that reference my context structure.  I understand why this is happening, but it means that I have to guess how long I should wait and then add a timer event to free the context.

I noticed a foreach function in a later version, and thought of switching to that, cycling through all the queued events to check if they're related to my fd, storing them in a list, and then deleting those events.


Then I said "what the hell!"

So, hereby requesting:
bufferevent_free_setcb()

Thanks, 
Dan
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.