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

Re: [Libevent-users] evhttp_request_own



 â 10 fÃvrier 2014 21:20 CET, Vincent Bernat <bernat@xxxxxxxx>Â:

> 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 majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.