diff options
Diffstat (limited to 'archives/extend/attachments/20131015')
4 files changed, 141 insertions, 0 deletions
diff --git a/archives/extend/attachments/20131015/203060cc/attachment.html b/archives/extend/attachments/20131015/203060cc/attachment.html new file mode 100644 index 00000000..93be1f66 --- /dev/null +++ b/archives/extend/attachments/20131015/203060cc/attachment.html @@ -0,0 +1,78 @@ +<tt> +<div dir="ltr">thanks for your help. suppose that I want to stream live audio. I do not know how long my audio program will be, and as I stream it, if I have a timeout, the server will just disconnect the user that listens to the audio in the browser. and the browser won't reconnect. Would you suggest the "right" way to implement something like that? Would infinite timeout suffice? or is it a bad practice? another type of handler maybe?</div><br> +<div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/15 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> +Yep. And it will also disconnect if the client sends too much. It has to disconnect and reconnect eventually, there's no way around it.<div class="im"><br><br> +<br><br> +On 10/16/2013 05:03 AM, akonsu wrote:<br><br> +</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br> +so it will disconnect if the client only listens and sends nothing to<br><br> +the socket, correct?<br><br> +<br><br> +<br></div><br> +2013/10/15 Loïc Hoguin <<a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>>><div class="im"><br><br> +<br><br> + The socket connected to the client.<br><br> +<br><br> + TCP isn't perfect, there is no way to be 100% sure the client is<br><br> + still connected, hence the timeout. If the client is still up you<br><br> + should make it reconnect.<br><br> +<br><br> +<br><br> + On 10/16/2013 04:55 AM, akonsu wrote:<br><br> +<br><br> + Hello,<br><br> +<br><br> + the documentation for `init` at<br></div><br> + <a href="http://ninenines.eu/docs/en/__cowboy/HEAD/manual/cowboy___loop_handler" target="_blank">http://ninenines.eu/docs/en/__<u></u>cowboy/HEAD/manual/cowboy___<u></u>loop_handler</a><div class="im"><br><br> + <<a href="http://ninenines.eu/docs/en/cowboy/HEAD/manual/cowboy_loop_handler" target="_blank">http://ninenines.eu/docs/en/<u></u>cowboy/HEAD/manual/cowboy_<u></u>loop_handler</a>><br><br> + says:<br><br> +<br><br> + The receive loop will run for a duration of up to Timeout<br><br> + milliseconds<br><br> + after it last received data from the socket, at which point it<br><br> + will stop<br><br> + and send a 204 No Content reply.<br><br> +<br><br> + What socket does it refer to? I had an impression that the loop<br><br> + handles<br><br> + erlang messages. Do these messages come through a socket (sorry<br><br> + about a<br><br> + trivial question, but I am new to erlang), and this is the<br><br> + socket that<br><br> + the docs talk about?<br><br> +<br><br> + The reason why I am asking is because I used to have a Timeout<br><br> + of 60000,<br><br> + and even though messages kept coming non stop, it still kept<br><br> + disconnecting after a minute, until I set Timeout to infinity.<br><br> +<br><br> + thanks<br><br> + Konstantin<br><br> +<br><br> +<br></div><br> + ______________________________<u></u>___________________<br><br> + Extend mailing list<br><br> + <a href="mailto:[email protected]" target="_blank">[email protected]</a> <mailto:<a href="mailto:[email protected]" target="_blank">Extend@lists.<u></u>ninenines.eu</a>><br><br> + <a href="http://lists.ninenines.eu:81/__listinfo/extend" target="_blank">http://lists.ninenines.eu:81/_<u></u>_listinfo/extend</a><div class="im"><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><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> +<br><br> +<br><br> +</div></blockquote><span class="HOEnZb"><font color="#888888"><br> +<br><br> +<br><br> +-- <br><br> +Loïc Hoguin</font></span><div class="HOEnZb"><div class="h5"><br><br> +Erlang Cowboy<br><br> +Nine Nines<br><br> +<a href="http://ninenines.eu" target="_blank">http://ninenines.eu</a><br><br> +</div></div></blockquote></div><br></div><br> + +</tt> diff --git a/archives/extend/attachments/20131015/591e8649/attachment.html b/archives/extend/attachments/20131015/591e8649/attachment.html new file mode 100644 index 00000000..d06f0bbe --- /dev/null +++ b/archives/extend/attachments/20131015/591e8649/attachment.html @@ -0,0 +1,46 @@ +<tt> +<div dir="ltr">so it will disconnect if the client only listens and sends nothing to the socket, correct?</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/15 Loïc Hoguin <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span><br><br> +<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The socket connected to the client.<br><br> +<br><br> +TCP isn't perfect, there is no way to be 100% sure the client is still connected, hence the timeout. If the client is still up you should make it reconnect.<div><div class="h5"><br><br> +<br><br> +On 10/16/2013 04:55 AM, 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> +Hello,<br><br> +<br><br> +the documentation for `init` at<br><br> +<a href="http://ninenines.eu/docs/en/cowboy/HEAD/manual/cowboy_loop_handler" target="_blank">http://ninenines.eu/docs/en/<u></u>cowboy/HEAD/manual/cowboy_<u></u>loop_handler</a> says:<br><br> +<br><br> +The receive loop will run for a duration of up to Timeout milliseconds<br><br> +after it last received data from the socket, at which point it will stop<br><br> +and send a 204 No Content reply.<br><br> +<br><br> +What socket does it refer to? I had an impression that the loop handles<br><br> +erlang messages. Do these messages come through a socket (sorry about a<br><br> +trivial question, but I am new to erlang), and this is the socket that<br><br> +the docs talk about?<br><br> +<br><br> +The reason why I am asking is because I used to have a Timeout of 60000,<br><br> +and even though messages kept coming non stop, it still kept<br><br> +disconnecting after a minute, until I set Timeout to infinity.<br><br> +<br><br> +thanks<br><br> +Konstantin<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> diff --git a/archives/extend/attachments/20131015/94506752/attachment.html b/archives/extend/attachments/20131015/94506752/attachment.html new file mode 100644 index 00000000..a847b802 --- /dev/null +++ b/archives/extend/attachments/20131015/94506752/attachment.html @@ -0,0 +1,8 @@ +<tt> +<div dir="ltr">Hello,<div><br></div><div>the documentation for `init` at <a href="http://ninenines.eu/docs/en/cowboy/HEAD/manual/cowboy_loop_handler">http://ninenines.eu/docs/en/cowboy/HEAD/manual/cowboy_loop_handler</a> says:</div><br> +<div><br></div><div>The receive loop will run for a duration of up to Timeout milliseconds after it last received data from the socket, at which point it will stop and send a 204 No Content reply.<br></div><div><br></div><br> +<div>What socket does it refer to? I had an impression that the loop handles erlang messages. Do these messages come through a socket (sorry about a trivial question, but I am new to erlang), and this is the socket that the docs talk about?</div><br> +<div><br></div><div>The reason why I am asking is because I used to have a Timeout of 60000, and even though messages kept coming non stop, it still kept disconnecting after a minute, until I set Timeout to infinity.</div><br> +<div><br></div><div>thanks</div><div>Konstantin</div></div><br> + +</tt> diff --git a/archives/extend/attachments/20131015/bac10460/attachment.html b/archives/extend/attachments/20131015/bac10460/attachment.html new file mode 100644 index 00000000..75224869 --- /dev/null +++ b/archives/extend/attachments/20131015/bac10460/attachment.html @@ -0,0 +1,9 @@ +<tt> +<div dir="ltr">1. do you mean that there is no way on the server side to tell if the client has disconnected?<div><br><div>2. if I use a normal handler, I will still run into the same problem, it does not matter which handler I use, from the standpoint of deciding whether the client is still there, right?</div><br> +<div><br></div><div>I am confused as to how I can implement my streaming and not drop the connection on each client and yet make sure I do close the connections when the clients disconnect...</div><div><br></div><div><div class="gmail_extra"><br> +<br><div class="gmail_quote">2013/10/15 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> +Infinite is bad practice, yes. Infinite means some connections will *never* be closed, eating FDs and memory for nothing.<br><br> +<br><br> +I'm not sure why you want to receive messages, you could just use a normal handler that asks for more data, sends it, ask for more data, sends it, etc.<div class="im"><br></div></blockquote></div></div></div></div></div><br> + +</tt> |