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

Re: [Libevent-users] multithreading problem



I misunderstood the way how your code works. After rereading it, I
think I will use it in my program. Thanks.

2013/1/8 Mark Ellzey <mthomas@xxxxxxxxxx>:
> On Tue, Jan 08, 2013 at 11:30:00AM +0100, Bj?rn K. wrote:
>> The posted code compiles on my machine without modifications. Thus I
>> wonder why you have to do some cleanup.
>> But the example code fails silently. Perhaps you don't run it with
>> enough rights to bind to port 443?
>>
>> Most of the time I access the server with a browser and keep the
>> reload button pressed. Sometimes I use the apache ab tool.
>>
>> I tried to understand how libevhtp works. If I get it right, all
>> connections are handled in the main thread and only the payload is
>> processed in a worker thread. For non-ssl connections this is fine but
>> for example for a ssl-only static web page server I think I do not
>> really profit from multithreading this way because all of the ssl
>> stuff is done in the main thread.
>>
>
>
> No. Each connection gets its accept callback in the main thread, the
> actual accept() / handshake is done in a thread.
> ***********************************************************************
> To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
> unsubscribe libevent-users    in the body.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.