[Development] Does QNetworkAccessManager could provide the Server Sent Event feature ?
Paul Chavent
paul.chavent at fnac.net
Mon Feb 16 23:52:19 CET 2015
On 02/16/2015 10:44 PM, Thiago Macieira wrote:
> On Monday 16 February 2015 21:52:13 Paul Chavent wrote:
>> Hi Qt dev list.
>>
>> I would like to ask you if there are any plans for providing Server Sent
>> Event [1] signals in the QNetworkAccessManager.
>>
>> The Server Sent Event (SSE) can be used by web pages that need asynchronous
>> updates from the server (a kind of server push mechanism). It is very
>> lightweight and is mainly used with HTTP.
>>
>> It could be implemented by adding a signal to QNetworkAccessManager that
>> delivers notifications.
>>
>> Would you be interested in the integration of such a feature ?
>>
>> Regards.
>>
>> Paul.
>>
>> [1] http://www.w3.org/TR/eventsource/
>
> That's a spec for DOM and JavaScript. Can you point us to a protocol spec of
> this? How is it implemented over HTTP?
>
The parts 6 "Parsing an event stream" [2] gives the specs of the format over http. The part 7 "Interpreting an event stream" explains how it should be handled by the client.
For some sample code, I've found useful those two pages [3] and [4].
[2] http://www.w3.org/TR/eventsource/#parsing-an-event-stream
[3] https://today.java.net/article/2010/03/31/html5-server-push-technologies-part-1#sse
[4] http://www.html5rocks.com/en/tutorials/eventsource/basics/
Paul.
More information about the Development
mailing list