fukamachi / woo

A fast non-blocking HTTP server on top of libev
http://ultra.wikia.com/wiki/Woo_(kaiju)
MIT License
1.28k stars 98 forks source link

Writing direclty to the output stream #25

Closed kayhman closed 9 years ago

kayhman commented 9 years ago

Hi,

I'd like to benchmark woo in my use case, but I need to be able to write directly to the output stream (as the json data that I return can be large).

Is there a way to access this output stream (as in hunchentoot) ?

Thanks,

guillaume

fukamachi commented 9 years ago

Woo doesn't provide stream interface for responding since Clack/Lack doesn't.

Because "stream" is slow in Common Lisp, Clack/Lack doesn't allow to access a response stream. Clack/Lack abstracts it as an anonymous function and it can also be applied to Woo. See Lack's README: https://github.com/fukamachi/lack#delayed-response-and-streaming-body

kayhman commented 9 years ago

Thanks,

This is exaclty what I was looking for.

Regards,

Guillaume