❦ 10 février 2014 21:20 CET, Vincent Bernat <[email protected]> :

> I have a hard time to understand how `evhttp_request_own()` should be
> used. I am trying to implement a websocket entry point. Therefore, once
> I have parsed the request headers, I call `evhttp_request_own()` and I
> do the upgrade myself. When I don't need the request anymore, I use
> `evhttp_request_free()`.
>
> However, when the connection is closed, I see that
> `evhttp_request_free()` is called again. So, it seems I just don't need
> to own the request and can just do whatever I want with it and not free
> it myself? I already modify the callbacks to put my own.

Using `evhttp_connection_free()` seems to works better for me.
-- 
Each module should do one thing well.
            - The Elements of Programming Style (Kernighan & Plauger)
***********************************************************************
To unsubscribe, send an e-mail to [email protected] with
unsubscribe libevent-users    in the body.

Reply via email to