On Wed, Mar 3, 2010 at 5:19 PM, Zac Sims <[email protected]> wrote: > G'day, > > Small question, which isn't documented as far as I know. If the underlying > socket of a buffered event is closed, will the close event (i.e. > BEV_EVENT_EOF) be generated before the read callback for the buffered event? > > That is, do the read events take priority over the BEV_EVENT_EOF event?
If you yourself close the socket, then stuff will fail in general; BEV_EVENT_EOF occurs when the other side closes the TCP connection, not when the socket is closed by your own program. Generally, if a bufferevent readcb and bufferevent EOF eventcb are both pending at once, they will get activated in that order. -- Nick *********************************************************************** To unsubscribe, send an e-mail to [email protected] with unsubscribe libevent-users in the body.
