[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] evhttp_request_own
- To: libevent-users <libevent-users@xxxxxxxxxxxxx>
- Subject: Re: [Libevent-users] evhttp_request_own
- From: Vincent Bernat <bernat@xxxxxxxx>
- Date: Mon, 10 Feb 2014 22:58:49 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Mon, 10 Feb 2014 16:58:56 -0500
- Dkim-signature: v=1; a=rsa-sha1; c=simple; d=luffy.cx; h=from:to:subject :references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=postfix; bh=945ZxnYNT eNBJTl7G9FPCsCUJHc=; b=wNNVYyfe8ey3TSEfGdBSWTAdxyGhnTJtIDUku6zfP wV2xx7E1uePjv2YyQ5vzK2ng02Wa9Xa/1s9AHZk3z/nY0aHZQ2b3vEn3Evf00kur PW+EpyZnjqlY/qQrwkaLV73+TPb85ycCuK94VV4ot8fJtAJ3H0oAavqKxJbHqWLv 28=
- Domainkey-signature: a=rsa-sha1; c=simple; d=luffy.cx; h=from:to:subject :references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=postfix; b=n5y vZq+dxNecxWg57e0xsU557Kk7NUrmjf8M1yd0GQSwhV00i3wmdDGPaV8yUWlDW97 NwysM2POR2bd52yLAELfmdSigCEwfW85AbYkaa+Xccep/tWiBB1qKXPMfU68tV/h 9iNWoOAioCQG1tBUvrqg08LWrYDyNaA0H3s8oQhA=
- In-reply-to: <m3ppmuvhw7.fsf@xxxxxxxxxxxx> (Vincent Bernat's message of "Mon, 10 Feb 2014 21:20:56 +0100")
- References: <m3ppmuvhw7.fsf@xxxxxxxxxxxx>
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
- User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)
â 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.