Jet supports what you were trying to do, it accepts a channel as return 
value to send the response to the client, and in the :body of the response 
(no matter the kind of response via a channel or map) to trigger chunked 
responses.

see here https://github.com/mpenet/jet#ring-async

On Saturday, September 27, 2014 8:08:48 PM UTC+2, mond wrote:
>
> Thanks for the tips. I wasn't expecting magic but otherwise your points 
> are well taken
>
> Ray
>
> Sent from my iPhone
>
> On 27 Sep 2014, at 16:55, James Reeves <ja...@booleanknot.com 
> <javascript:>> wrote:
>
> On 27 September 2014 10:01, mond <r...@mcdermott.be <javascript:>> wrote:
>
>>
>> Speaking to the main point, no I don't want to put a channel on to the 
>> response so that's a mistake that I see and would like to avoid. I would 
>> like to understand where I have gone wrong.
>>
>
> You're trying to use core.async with a library that has no understanding 
> of core.async. It's important to understand that core.async isn't magic; it 
> won't work with libraries that weren't designed for it.
>  
>
>> Maybe I need to use HTTPkit instead?
>>
>
> HTTP Kit has good support for async, but uses its own lightweight 
> protocol. Check out the examples on their website, and if you still want to 
> connect a core.async channel up to HTTP Kit, you'll need something like:
>
>     (async/take! async-ch (fn [msg] (httpkit/send! http-ch msg)))
>
> This tells core.async to take values off the async channel and pass them 
> onto HTTP Kit.
>
> - James
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to