[Libevent-users] Closing connection after bufferevent_write

Matt Pearson 404emailnotfound at gmail.com
Thu Apr 17 00:30:49 EDT 2008


Yes, just specify a write callback on the bufferevent and enable
writes.  It will call the callback when its buffer is empty, and then
you can free the bufferevent and close the file descriptor.  If this
could happen multiple times and you only want it to close on the last
one, then just add some sort of flag to struct client.

(On an unrelated note, Gmail seems to think a lot of traffic on this
list is spam.  Does that happen for everyone else?)


More information about the Libevent-users mailing list