diff options
Diffstat (limited to '_build/static/archives/extend/attachments/20130920/32352505/attachment.html')
-rw-r--r-- | _build/static/archives/extend/attachments/20130920/32352505/attachment.html | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/_build/static/archives/extend/attachments/20130920/32352505/attachment.html b/_build/static/archives/extend/attachments/20130920/32352505/attachment.html new file mode 100644 index 00000000..d2c317ee --- /dev/null +++ b/_build/static/archives/extend/attachments/20130920/32352505/attachment.html @@ -0,0 +1,49 @@ +<tt> +<div dir="ltr">thanks!<div><br></div><div>how to implement timeout callback manually? if I had receive then I would just use timeout clause there, but with the handler I do not know...<br><div><br></div><div>I have doubts about validity of my question on the erlang list. I later realised that there is no problem receiving messages in my handler from my upstream process, I can do it fast enough and shove everything to the response. my real problem is to determine if the http client is reading fast enough from the response...</div><br> +</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/20 Loïc Hoguin <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br> +Loop handlers close after a while regardless of what you send, it only checks what the client sends. The best way for you would be to disable that timeout and handle it manually.<br><br> +<br><br> +As for the second question, I'm still reading the thread on erlang-questions but I've seen some good ideas about timestamps so far.<div><div class="h5"><br><br> +<br><br> +On 09/20/2013 08:47 PM, akonsu wrote:<br><br> +</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><br> +Hi,<br><br> +<br><br> +I am using loop handler and I stream from it:<br><br> +<br><br> +info({stream, Part}, Req, S) -><br><br> + ok = cowboy_req:chunk(Part, Req),<br><br> + {loop, Req, S, hibernate};<br><br> +<br><br> +I have two questions:<br><br> +<br><br> +1. on timeouts cowboy sends 204 No Content. In my case it is not the<br><br> +right response because I may have already sent some data. Is there a way<br><br> +to send a custom response?<br><br> +<br><br> +2. how to check if the client is too slow and is not reading the<br><br> +response stream fast enough? If this happens, then I need to disconnect.<br><br> +<br><br> +I can live without 1. but I need to figure out 2. Please help.<br><br> +<br><br> +thank you!<br><br> +Konstantin<br><br> +<br><br> +<br><br> +<br></div></div><br> +______________________________<u></u>_________________<br><br> +Extend mailing list<br><br> +<a href="mailto:[email protected]" target="_blank">[email protected]</a><br><br> +<a href="http://lists.ninenines.eu:81/listinfo/extend" target="_blank">http://lists.ninenines.eu:81/<u></u>listinfo/extend</a><br><br> +<br><span class="HOEnZb"><font color="#888888"><br> +</font></span></blockquote><span class="HOEnZb"><font color="#888888"><br> +<br><br> +<br><br> +-- <br><br> +Loďc Hoguin<br><br> +Erlang Cowboy<br><br> +Nine Nines<br><br> +<a href="http://ninenines.eu" target="_blank">http://ninenines.eu</a><br><br> +</font></span></blockquote></div><br></div><br> + +</tt> |