Hi Azat

There is not any special when enable libevent internal logging.
I ask question on openssl mail list to verify whether it's the problem with
openssl.
The openssl guys said TCP will discard data on receiving RST if application
couldn't fetch data from tcp stack in time.
But after looking through the kernel code, linux seems don't discard data
when receiving rst.
I'm a little lost.


On Wed, Dec 2, 2015 at 7:49 PM, Anty Rao <[email protected]> wrote:

>
>
> On Wed, Dec 2, 2015 at 7:45 PM, Anty Rao <[email protected]> wrote:
>
>> Hi Azat
>> The behaviour of my program:
>> 1. one thread produce messages , put it in an queue. if queue size change
>> from 0 to 1, write one byte notify message.
>> 2. the libevent event loop(another thread) receive the notify message,
>> begin to invoke notify callback:
>>     1. drain some messages from the queue
>>     2. bufferevent_write to write message.
>> 3. write callback
>>     1. if output buffer size of bufferevent is > 0 ,return
>>     2. drain some messages from the queue(if any)
>>     3. bufferevent_write to write message.
>>
>>    4. read callback
>         1. try read response. when server send response, it always means
> the TCP connection will be close.
>
>> On Wed, Dec 2, 2015 at 7:14 PM, Azat Khuzhin <[email protected]> wrote:
>>
>>> On Wed, Dec 02, 2015 at 04:30:08PM +0800, Anty Rao wrote:
>>> > Hi Azat
>>> > I break on event callback, here is the result:
>>>
>>> Can you describe behaviour of the program more?
>>>
>>> I.e. when event callback is triggered, after specific timeout?
>>> Does read/write callback triggered before?
>>>
>>
>> Only write callback triggered.
>>
>>
>>> Or you can add some logs into you application and post them here.
>>>
>>> Also you can enable libevent internal logging with
>>> event_enable_debug_logging().
>>>
>>
>> I will try.
>>
>>> ***********************************************************************
>>> To unsubscribe, send an e-mail to [email protected] with
>>> unsubscribe libevent-users    in the body.
>>>
>>
>>
>>
>> --
>> Anty Rao
>>
>
>
>
> --
> Anty Rao
>



-- 
Anty Rao

Reply via email to