Hi, > Hey, > I understand Simon's view on how not to close buffer event sockets, but > can some one explain why thishttps://gist.github.com/714606idea is bad? I don't feel "strongly" that this is incorrect; Simon may have more information on this. But, basically it is just added overhead to do it that way since you will get repeated calls to the callback which may or may not be related to what you want. I.e. you may get 10-100 calls to the callback if there is a lot of work remaining.
If you use the watermark you don't have to do any checks or worry about multiple callbacks. The next time you get a write callback you simply know it is safe to close the buffer. My understanding of the info callback is that it is meant more for pure information gathering, i.e. kb/s tracking for instance. But, it seems like the solution you found can work, just seems like it's not the best way. KB *********************************************************************** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-users in the body.