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

Re: [Libevent-users] How http client can send back message to server?



On Fri, Dec 10, 2010 at 12:18 PM, Zulfiqer Sekender <zulfiqers@xxxxxxxxx> wrote:
> Hi,
>
> I have to develop a simple http client which can communicate with a http
> server. The client is sending evhttp_make_request(). The server sends "HT:"
> heartbeat in response after certain time and when the client gets "HT:" each
> time it will send "HA:" as heartbeat acknowledgement. Transfering of "HT:" &
> "HA:" should go on.
>
> I developed the following client program. It gets "HT:" and tries to send
> back "HA:". But server never gets the "HA:".
>
> I will highly appreciate any help regarding this. Please, let me know what
> wrong I am doing and how to do it correctly.  (Intentionally I left few
> commented out lines to show what else options I tried.)

You didn't say what version of Libevent you are trying this with.
2.0.9-rc fixes some evhttp bugs that might or might not be relevant to
you here.

You might also want to post a small example of the server-side of this
code; otherwise it's not actually possible to test & run it.

Failing that, your best bet is probably to look through the http.c
source code in Libevent to see what part of the code would need to
change to make this work for you.  I'm not at all sure whether and to
what degree evhttp currently supports what you want to do.  Anybody
else here with more evhttp experience want to chime in?

yrs,
-- 
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.