From c807880f7ac73f813b2660ea81a00f7712a4e793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 29 Aug 2016 12:39:49 +0200 Subject: Add old mailing list archives --- .../archives/extend/2013-October/000276.html | 98 ++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 _build/static/archives/extend/2013-October/000276.html (limited to '_build/static/archives/extend/2013-October/000276.html') diff --git a/_build/static/archives/extend/2013-October/000276.html b/_build/static/archives/extend/2013-October/000276.html new file mode 100644 index 00000000..4445393d --- /dev/null +++ b/_build/static/archives/extend/2013-October/000276.html @@ -0,0 +1,98 @@ + + + + [99s-extend] timeout in cowboy loop handler + + + + + + + + + + +

[99s-extend] timeout in cowboy loop handler

+ Loïc Hoguin + essen at ninenines.eu +
+ Wed Oct 16 06:07:26 CEST 2013 +

+
+ +
On 10/16/2013 05:48 AM, akonsu wrote:
+> 1. do you mean that there is no way on the server side to tell if the
+> client has disconnected?
+
+There are ways, and Cowboy will happily detect them. There's also the 
+problem that a side may be closed without the other side knowing about 
+it, which is why you need timeouts.
+
+> 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?
+
+If the client is gone, the send will fail. Normal handlers are pretty 
+much the same except they don't have a timeout, because your code has an 
+explicit end.
+
+> 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...
+>
+>
+> 2013/10/15 Loïc Hoguin <essen at ninenines.eu <mailto:essen at ninenines.eu>>
+>
+>     Infinite is bad practice, yes. Infinite means some connections will
+>     *never* be closed, eating FDs and memory for nothing.
+>
+>     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.
+>
+
+
+-- 
+Loïc Hoguin
+Erlang Cowboy
+Nine Nines
+http://ninenines.eu
+
+
+ + +
+

+ +
+More information about the Extend +mailing list
+ -- cgit v1.2.3