[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] evhttp_request_own
- To: libevent-users <libevent-users@xxxxxxxxxxxxx>
- Subject: [Libevent-users] evhttp_request_own
- From: Vincent Bernat <bernat@xxxxxxxx>
- Date: Mon, 10 Feb 2014 21:20:56 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Mon, 10 Feb 2014 15:21:09 -0500
- Dkim-signature: v=1; a=rsa-sha1; c=simple; d=luffy.cx; h=from:to:subject :date:message-id:mime-version:content-type; s=postfix; bh=FgcAVT e4hQkA9uNHM+T9hnGtgJ0=; b=TZCW5+s6OVkYRMA3f5MXLUNBc/gbKVl1hwdd02 OOlFrOgPpmTTL9aKVlh3HUDBatyolTIgGEQ8JraQ797SEab2z7/Bx7jc88Dr4x8j lVIMNovwujWVHOL1oHxhsLd56CmwBWyyUOFrfM5tzkijDZWtOCQMJp1tB1cpM1S1 HyImM=
- Domainkey-signature: a=rsa-sha1; c=simple; d=luffy.cx; h=from:to:subject :date:message-id:mime-version:content-type; q=dns; s=postfix; b= DInhfMzd97/xy6GLI8wj0Q8XVVSVP8t1DfhmPeAqBUKEO8wZuN+ROc9Fu75+ktNQ I7eVBxeBZvVo83JIi3X5ELAGZtV9eboVa7ne/yFvSjlr3MSF5tdOXDgJDZHIoxmY ThoDLBAPcSxIb8E5h5zB60XAfXDHKRSLoyKX3NdUDKU=
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
- User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)
Hi!
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.
The documentation is not quite clear on this.
--
Write clearly - don't sacrifice clarity for "efficiency".
- The Elements of Programming Style (Kernighan & Plauger)
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.