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

Re: Re: [Libevent-users] unsend data in output buffer when closeconnection



yes, free and create new bufferevent won't affect the performance   because the connection close event is rare
 the reason why I want to reuse bufferevent is  that I want to resend the data in bufferevent's output buffer 
and don't want store data twice (one in output buffer and one in my code)

now I see I must store message in my code and wait confirm message from server (I don't how many data was sent by bufferevent)
or I must allow some data loss 

Thank you , Mark!


2015-01-22 



slump 



发件人: Mark Ellzey 
发送时间: 2015-01-22  03:29:36 
收件人: libevent-users 
抄送: 
主题: Re: [Libevent-users] unsend data in output buffer when closeconnection 
 
On Wed, Jan 21, 2015 at 06:11:19PM +0800, slump wrote:
> So, it seems that the best I can do is free the bufferevent and create new one
This is how I would do it, with CLOSE_ON_FREE set. I'm going to take a
wild guess and say it will not affect the performance of your
application, and in the meantime make things easier.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.