cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Server-sent events with libcurl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 28 Dec 2010 20:10:01 +0100 (CET)

On Tue, 28 Dec 2010, amit paliwal wrote:

> I am sorry Daniel but still you are taking em wrong. Please see my comments
> below.

Sure I'm wrong. You are constantly confusing terms about what SSE is and how
HTTP works, so based on that I'm guessing what you're actually asking and how
to answer. But on the other hand I'm convinced that your questions are wrong
too so we might be even! :-)

> Reply: simpe question
>
> Will curl call my callback function upon receiving SSE from Server

libcurl always call the write callback when it receives HTTP response
contents, so of course it will do so for SSE contents as well.

> and these SSE will be on top oog HTTP response??

SSE *is* HTTP response.

> and if I receive I will have to reply for this SSE in the form of HTTP GET
> with payload, here HTTP GET is reply to SSE and not a separate GET.

That's wrong. SSE is *server-sent*. There is no concept of *replying* to a SSE
message on the same connection or anything. Your question is about how to do
something that isn't within the specs or the SSE protocol. It's therefor not a
simple question.

That's not even possible with pipelining I believe since the GET has a
payload, but I haven't checked the details on what HTTP allows.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-12-28