Hi Greg,
Thanks for your response. I asked this question on #snapframwork and mightbyte suggested I look at that project.
I looked at cufp2011 but it seemed like the long polling technique was still based on one request to one response (even though it may be in multiple chunks). I'm looking for something like a server push with one request, for e.g.:
Request:
GET / HTTP/1.1
Host: localhost:8000
Response:
HTTP/1.1 200 OK
Transfer-Encoding: chunked
3
foo
[...an arbitrary delay...]
3
foo
I tried creating a custom enumerator:
http://hpaste.org/85513. This seems to work if I omit the threadDelay, otherwise I don't receive a response from the server. I'd appreciate if you could take a look, I have a feeling something like this would be obvious to those familiar with Snap.
The real world context for this is that I want to send the first part of the HTML content the <head>, which is mostly static and available immediately, and then have the dynamic content, which is vulnerable to latency in the backend, sent later.