<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: Diving into Node.js &#8211; A Long Polling Example</title>
	<atom:link href="/2010/12/02/diving-into-node-js-a-long-polling-example/feed/" rel="self" type="application/rss+xml" />
	<link>/2010/12/02/diving-into-node-js-a-long-polling-example/</link>
	<description>on web development</description>
	<lastBuildDate>Fri, 26 Oct 2018 21:40:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>By: Zu-Zu</title>
		<link>/2010/12/02/diving-into-node-js-a-long-polling-example/comment-page-1/#comment-426114</link>
		<dc:creator><![CDATA[Zu-Zu]]></dc:creator>
		<pubDate>Tue, 25 Oct 2016 09:56:10 +0000</pubDate>
		<guid isPermaLink="false">/?p=2041#comment-426114</guid>
		<description><![CDATA[ome problem with it is that node js will block others request if u do nor res,end() the current connection. if u start spawning workers for each of the long poll request that can take quite a while u will end up having apache server instead of even based server.]]></description>
		<content:encoded><![CDATA[<p>ome problem with it is that node js will block others request if u do nor res,end() the current connection. if u start spawning workers for each of the long poll request that can take quite a while u will end up having apache server instead of even based server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KJ4IPS</title>
		<link>/2010/12/02/diving-into-node-js-a-long-polling-example/comment-page-1/#comment-339543</link>
		<dc:creator><![CDATA[KJ4IPS]]></dc:creator>
		<pubDate>Mon, 13 Jul 2015 21:46:39 +0000</pubDate>
		<guid isPermaLink="false">/?p=2041#comment-339543</guid>
		<description><![CDATA[@Mehr
Node has depreciated the use of the _idleStart property of sockets.
This could be re-implemented without the use of that function by simply passing around an object contains the time.

A version using this fix is availble here.
https://pste.me/#/fix-for-long-polling-example.js

I also added some returns and a clearTimeout to avoid callbacks firing on dead sockets]]></description>
		<content:encoded><![CDATA[<p>@Mehr<br />
Node has depreciated the use of the _idleStart property of sockets.<br />
This could be re-implemented without the use of that function by simply passing around an object contains the time.</p>
<p>A version using this fix is availble here.<br />
<a href="https://pste.me/#/fix-for-long-polling-example.js" rel="nofollow">https://pste.me/#/fix-for-long-polling-example.js</a></p>
<p>I also added some returns and a clearTimeout to avoid callbacks firing on dead sockets</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike C</title>
		<link>/2010/12/02/diving-into-node-js-a-long-polling-example/comment-page-1/#comment-337275</link>
		<dc:creator><![CDATA[Mike C]]></dc:creator>
		<pubDate>Sat, 04 Jul 2015 20:33:08 +0000</pubDate>
		<guid isPermaLink="false">/?p=2041#comment-337275</guid>
		<description><![CDATA[In the long poll resolution when you timeout, instead of responding status=200 with an arbitrary &quot;OK&quot; response, respond status=204 with no data.]]></description>
		<content:encoded><![CDATA[<p>In the long poll resolution when you timeout, instead of responding status=200 with an arbitrary &#8220;OK&#8221; response, respond status=204 with no data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mehr Lehmeher</title>
		<link>/2010/12/02/diving-into-node-js-a-long-polling-example/comment-page-1/#comment-294681</link>
		<dc:creator><![CDATA[Mehr Lehmeher]]></dc:creator>
		<pubDate>Sun, 05 Apr 2015 12:11:46 +0000</pubDate>
		<guid isPermaLink="false">/?p=2041#comment-294681</guid>
		<description><![CDATA[Great post, but I&#039;m getting the following error when the client makes a request (using node v0.12.0

if (date-request.socket._idleStart.getTime() &#062; 59999) {
                                                                            ^
TypeError: undefined is not a function

I can&#039;t find any documentation on &#039;date-request&#039;, and it looks like you are using the same thing down in the &#039;if file has changed&#039; block, but are not including &#039;date-request&#039;.

Any idea what I am doing wrong here?  I copied and pasted your code and it&#039;s throwing this error.]]></description>
		<content:encoded><![CDATA[<p>Great post, but I&#8217;m getting the following error when the client makes a request (using node v0.12.0</p>
<p>if (date-request.socket._idleStart.getTime() &gt; 59999) {<br />
                                                                            ^<br />
TypeError: undefined is not a function</p>
<p>I can&#8217;t find any documentation on &#8216;date-request&#8217;, and it looks like you are using the same thing down in the &#8216;if file has changed&#8217; block, but are not including &#8216;date-request&#8217;.</p>
<p>Any idea what I am doing wrong here?  I copied and pasted your code and it&#8217;s throwing this error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: selvi</title>
		<link>/2010/12/02/diving-into-node-js-a-long-polling-example/comment-page-1/#comment-22511</link>
		<dc:creator><![CDATA[selvi]]></dc:creator>
		<pubDate>Wed, 30 Apr 2014 12:10:05 +0000</pubDate>
		<guid isPermaLink="false">/?p=2041#comment-22511</guid>
		<description><![CDATA[I put this above &#039;Looping Server&#039; code in server.js.

But there is no response. am using ubuntu.

Any solution?]]></description>
		<content:encoded><![CDATA[<p>I put this above &#8216;Looping Server&#8217; code in server.js.</p>
<p>But there is no response. am using ubuntu.</p>
<p>Any solution?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aamir Afridi</title>
		<link>/2010/12/02/diving-into-node-js-a-long-polling-example/comment-page-1/#comment-21592</link>
		<dc:creator><![CDATA[Aamir Afridi]]></dc:creator>
		<pubDate>Thu, 20 Mar 2014 14:53:11 +0000</pubDate>
		<guid isPermaLink="false">/?p=2041#comment-21592</guid>
		<description><![CDATA[Thank you for sharing such a good tutorial.

Everything was looking so good unless you jumped to a massive example in &#039;Looping Server&#039; section and that made me really sad. You should have add simpler examples before reading to this complex example step by step so we can try your code while reading it :/

Googling again hopelessly to find a more simpler tutorial :(]]></description>
		<content:encoded><![CDATA[<p>Thank you for sharing such a good tutorial.</p>
<p>Everything was looking so good unless you jumped to a massive example in &#8216;Looping Server&#8217; section and that made me really sad. You should have add simpler examples before reading to this complex example step by step so we can try your code while reading it :/</p>
<p>Googling again hopelessly to find a more simpler tutorial 🙁</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shashi</title>
		<link>/2010/12/02/diving-into-node-js-a-long-polling-example/comment-page-1/#comment-16339</link>
		<dc:creator><![CDATA[Shashi]]></dc:creator>
		<pubDate>Sat, 14 Jul 2012 11:43:53 +0000</pubDate>
		<guid isPermaLink="false">/?p=2041#comment-16339</guid>
		<description><![CDATA[Thanks a lot for sharing a working example... Node.js rocks  :)]]></description>
		<content:encoded><![CDATA[<p>Thanks a lot for sharing a working example&#8230; Node.js rocks  🙂</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Melin</title>
		<link>/2010/12/02/diving-into-node-js-a-long-polling-example/comment-page-1/#comment-15442</link>
		<dc:creator><![CDATA[Melin]]></dc:creator>
		<pubDate>Mon, 09 Apr 2012 20:34:52 +0000</pubDate>
		<guid isPermaLink="false">/?p=2041#comment-15442</guid>
		<description><![CDATA[You could also use Chilly Framework, which handles long polling for you. It&#039;s available through node packet manager.

&lt;a href=&quot;http://chillyframework.com/documentation/&quot; rel=&quot;nofollow&quot;&gt;http://chillyframework.com/documentation/&lt;/a&gt;]]></description>
		<content:encoded><![CDATA[<p>You could also use Chilly Framework, which handles long polling for you. It&#8217;s available through node packet manager.</p>
<p><a href="http://chillyframework.com/documentation/" rel="nofollow">http://chillyframework.com/documentation/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giovanni</title>
		<link>/2010/12/02/diving-into-node-js-a-long-polling-example/comment-page-1/#comment-15105</link>
		<dc:creator><![CDATA[Giovanni]]></dc:creator>
		<pubDate>Fri, 03 Feb 2012 22:09:30 +0000</pubDate>
		<guid isPermaLink="false">/?p=2041#comment-15105</guid>
		<description><![CDATA[@wiill I agree, the result would be the same, but way safer. 
In fact a setTimeout calling the function where it is contained is a commonly adopted safe way to do cycle indefinetly with invervals, even instead of setInterval, because it makes sure that the calling function ends before the called one starts.]]></description>
		<content:encoded><![CDATA[<p>@wiill I agree, the result would be the same, but way safer.<br />
In fact a setTimeout calling the function where it is contained is a commonly adopted safe way to do cycle indefinetly with invervals, even instead of setInterval, because it makes sure that the calling function ends before the called one starts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoimen</title>
		<link>/2010/12/02/diving-into-node-js-a-long-polling-example/comment-page-1/#comment-15036</link>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
		<pubDate>Tue, 24 Jan 2012 10:41:03 +0000</pubDate>
		<guid isPermaLink="false">/?p=2041#comment-15036</guid>
		<description><![CDATA[@wiill - interesting case. I&#039;ve to check this out with some performance tests.]]></description>
		<content:encoded><![CDATA[<p>@wiill &#8211; interesting case. I&#8217;ve to check this out with some performance tests.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
