<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Florent Clairambault &#187; Ajax</title>
	<atom:link href="http://florent.clairambault.fr/tag/ajax/feed" rel="self" type="application/rss+xml" />
	<link>http://florent.clairambault.fr</link>
	<description></description>
	<lastBuildDate>Wed, 28 Jul 2010 20:31:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Ajax Push Engine 1.0 released</title>
		<link>http://florent.clairambault.fr/ajax-push-engine-1-0-released?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=ajax-push-engine-1-0-released</link>
		<comments>http://florent.clairambault.fr/ajax-push-engine-1-0-released#comments</comments>
		<pubDate>Tue, 08 Dec 2009 06:45:18 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[APE]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[push]]></category>
		<category><![CDATA[SpiderMonkey]]></category>

		<guid isPermaLink="false">http://florent.clairambault.fr/?p=2129</guid>
		<description><![CDATA[I&#8217;m quite unlucky because I&#8217;ve downloaded the APE BETA5 just before they (I mean Anthony Catel) released the 1.0. The quite interesting part is that it fixes all the bugs I&#8217;ve talked about sooner. So we could say my last post won&#8217;t be very useful to anyone. Still, if you want to compile APE on [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m quite unlucky because I&#8217;ve downloaded the APE BETA5 just before they (I mean Anthony Catel) released the 1.0. The quite interesting part is that it fixes all the bugs I&#8217;ve talked about sooner. So we could say my last post won&#8217;t be very useful to anyone.</p>
<p>Still, if you want to compile APE on CentOS x64, you have have to edit the modules/Makefile file and add the &#8220;-L/usr/lib64/mysql&#8221; command arg. It will give you something like that :</p>

<div class="wp_codebox"><table><tr id="p21292"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p2129code2"><pre class="sh" style="font-family:monospace;">ifeq ($(HAS_MYSQL), yes)
        MYSQL_FLAGS = -L./deps/mysac/ -I./deps/mysac/ -lmysac -L/usr/lib64/mysql -lmysqlclient_r
endif</pre></td></tr></table></div>

<p>They also added some <a href="http://www.ape-project.org/en/demos/">new great demos</a> but they are not included in the 1.0 sources. I&#8217;ve been closely following their websites for the last two days and they did an awesome job in a very short time. And I guess a lof of people are taking interest in this project because you can see a lot of monkeys on the <a href="http://www.ape-project.org/en/home.html">APE home page</a>.</p>
<p>As soon as possible, I will make some little test with the very interesting <a href="http://github.com/APE-Project/APE_Server/tree/master/scripts/">javascript server-side code</a> based on <a href="http://www.mozilla.org/js/spidermonkey/">SpiderMonkey</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/ajax-push-engine-1-0-released/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ajax Push Engine 1.0 Beta 5</title>
		<link>http://florent.clairambault.fr/ajax-push-engine-1-0beta5?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=ajax-push-engine-1-0beta5</link>
		<comments>http://florent.clairambault.fr/ajax-push-engine-1-0beta5#comments</comments>
		<pubDate>Sun, 06 Dec 2009 21:00:47 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[APE]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[push]]></category>

		<guid isPermaLink="false">http://florent.clairambault.fr/?p=2103</guid>
		<description><![CDATA[I talked quickly about APE in a recent post. I recently downloaded a new version of their program and I&#8217;ve installed it successfully and it works much better. Since the first released verison, it has become quite easy, you just have to launch &#8220;./build.sh&#8221;. I had some problems with the linker on my CentOS system [...]]]></description>
			<content:encoded><![CDATA[<p>I talked quickly about <a href="http://www.ape-project.org/">APE</a> in <a href="http://florent.clairambault.fr/push-comet-or-pull">a recent post</a>. I recently downloaded a new version of their program and<br />
I&#8217;ve installed it successfully and it works much better. Since the first released verison, it has become quite easy, you just have to launch &#8220;./build.sh&#8221;. I had some problems with the linker on my CentOS system and the mysql libraries. But I solved it by added &#8220;-L/var/lib64/mysql&#8221; to some line of the Makefile.</p>
<p><strong>How to make the demos work</strong><br />
They are some tiny bugs that took me quite some time to bypass :</p>
<ul>
<li>To use the <a href="http://ape.webingenia.com/Demos/Controller/demo.html">controller demo</a>, <a name="fix_controller">you need to</a> put the modules/conf/inlinepush.conf file into bin. I guess this will be fixed someday soon but still, that&#8217;s how it works right now.</li>
<li>To use the <a href="http://ape.webingenia.com/Demos/Move/demo.html">move demo</a>, <a name="fix_move">you need to</a> change the scripts/main.ape.js file and add this line :

<div class="wp_codebox"><table><tr id="p210310"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p2103code10"><pre class="javascript" style="font-family:monospace;">include<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;examples/move.js&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

</li>
<li>To use the <a href="http://ape.webingenia.com/Demos/Controller/demo.html">TCPSocket demo</a>, you need to copy the modules/conf/proxy.conf file into bin.</li>
</ul>
<p>Note : Each time you modify a script file (within the &#8220;scripts&#8221; directoy of APE), you have to restart the server.</p>
<p><strong>The very interesting javascript backend</strong><br />
This project is very interesting because everything in the backend is handled by some little javascript files, the move example file is this one :</p>

<div class="wp_codebox"><table><tr id="p210311"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code" id="p2103code11"><pre class="javascript" style="font-family:monospace;">Ape.<span style="color: #660066;">registerCmd</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'setpos'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>params<span style="color: #339933;">,</span> infos<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>$defined<span style="color: #009900;">&#40;</span>params.<span style="color: #660066;">x</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>$defined<span style="color: #009900;">&#40;</span>params.<span style="color: #660066;">y</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>isFinite<span style="color: #009900;">&#40;</span>params.<span style="color: #660066;">x</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>isFinite<span style="color: #009900;">&#40;</span>params.<span style="color: #660066;">y</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
&nbsp;
        infos.<span style="color: #660066;">user</span>.<span style="color: #660066;">setProperty</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'x'</span><span style="color: #339933;">,</span> params.<span style="color: #660066;">x</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        infos.<span style="color: #660066;">user</span>.<span style="color: #660066;">setProperty</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'y'</span><span style="color: #339933;">,</span> params.<span style="color: #660066;">y</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// We get the channel</span>
        <span style="color: #003366; font-weight: bold;">var</span> chan <span style="color: #339933;">=</span> Ape.<span style="color: #660066;">getChannelByPubid</span><span style="color: #009900;">&#40;</span>params.<span style="color: #660066;">pipe</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// And send the position data of the calling user on it</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>chan<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                chan.<span style="color: #660066;">pipe</span>.<span style="color: #660066;">sendRaw</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'positions'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'x'</span><span style="color: #339933;">:</span> params.<span style="color: #660066;">x</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'y'</span><span style="color: #339933;">:</span> params.<span style="color: #660066;">y</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'from'</span><span style="color: #339933;">:</span> infos.<span style="color: #660066;">user</span>.<span style="color: #660066;">pipe</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'109'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'UNKNOWN_PIPE'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This is what allows the client to send this kind of request :</p>

<div class="wp_codebox"><table><tr id="p210312"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p2103code12"><pre class="json" style="font-family:monospace;">[{&quot;cmd&quot;:&quot;SETPOS&quot;,&quot;chl&quot;:10,&quot;params&quot;:{&quot;x&quot;:282,&quot;y&quot;:38,&quot;pipe&quot;:&quot;3dcaa701e8ee3394d65d5f71cd18e428&quot;},&quot;sessid&quot;:&quot;b897476d835d12c150fb9fc337c7c93d&quot;}]</pre></td></tr></table></div>

<p>If you don&#8217;t add the include line, the answer will be something like that :</p>

<div class="wp_codebox"><table><tr id="p210313"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p2103code13"><pre class="json" style="font-family:monospace;">[{&quot;time&quot;:&quot;1260123358&quot;,&quot;raw&quot;:&quot;ERR&quot;,&quot;data&quot;:{&quot;chl&quot;:10,&quot;code&quot;:&quot;003&quot;,&quot;value&quot;:&quot;BAD_CMD&quot;}}]</pre></td></tr></table></div>

<p>The &#8220;BAD_CMD&#8221; reply means that this commands hasn&#8217;t be registered by the Ape.registerCmd method. If you come here because that happened to you, just <a href="#fix_move">fix it</a>.</p>
<p>For the Controller demo, this is exactly the same. The file is :</p>

<div class="wp_codebox"><table><tr id="p210314"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code" id="p2103code14"><pre class="javascript" style="font-family:monospace;">Ape.<span style="color: #660066;">registerCmd</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;inlinepush&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>params<span style="color: #339933;">,</span> infos<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #006600; font-style: italic;">// We check the password (&quot;password&quot; parameter of the &quot;inlinepush.conf&quot; file)</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>params.<span style="color: #660066;">password</span> <span style="color: #339933;">==</span> Ape.<span style="color: #660066;">config</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;inlinepush.conf&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;password&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #006600; font-style: italic;">// If every request parameters have been correctly defined</span>
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$defined<span style="color: #009900;">&#40;</span>params.<span style="color: #660066;">channel</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> $defined<span style="color: #009900;">&#40;</span>params.<span style="color: #660066;">data</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> $defined<span style="color: #009900;">&#40;</span>params.<span style="color: #660066;">raw</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #006600; font-style: italic;">// We get the channel</span>
                        <span style="color: #003366; font-weight: bold;">var</span> chan <span style="color: #339933;">=</span> Ape.<span style="color: #660066;">getChannelByName</span><span style="color: #009900;">&#40;</span>params.<span style="color: #660066;">channel</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>$defined<span style="color: #009900;">&#40;</span>chan<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;401&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;UNKNOWN_CHANNEL&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
                        <span style="color: #006600; font-style: italic;">// We send the data (as received) back to the channel</span>
                        chan.<span style="color: #660066;">pipe</span>.<span style="color: #660066;">sendRaw</span><span style="color: #009900;">&#40;</span>params.<span style="color: #660066;">raw</span><span style="color: #339933;">,</span> params.<span style="color: #660066;">data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;pushed&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;data&quot;</span><span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;value&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;ok&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;400&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;BAD_PASSWORD&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<p>If you get the the BAD_PASSWORD error response and you&#8217;re not sure why, you can change the BAD_PASSWORD line by :</p>

<div class="wp_codebox"><table><tr id="p210315"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p2103code15"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;400&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;BAD_PASSWORD, the right one is :&quot;</span><span style="color: #339933;">+</span>Ape.<span style="color: #660066;">config</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;inlinepush.conf&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;password&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>If you get &#8220;BAD_PASSWORD, the right one is :&#8221;. There&#8217;s a good chance you didn&#8217;t <a href="#fix_controller">move the inlinepush.conf into the bin directory</a>.</p>
<p><strong>Sample communications</strong><br />
Here is a sample chat communication</p>

<div class="wp_codebox"><table><tr id="p210316"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
</pre></td><td class="code" id="p2103code16"><pre class="txt" style="font-family:monospace;">Echange CHAT :
--&gt; [{&quot;cmd&quot;:&quot;script&quot;,&quot;params&quot;:{&quot;domain&quot;:&quot;ape.webingenia.com&quot;,&quot;scripts&quot;:[&quot;http://ape.webingenia.com/Source/mootools-core.js&quot;,&quot;http://ape.webingenia.com/Source/Core/APE.js&quot;,&quot;http://ape.webingenia.com/Source/Core/Events.js&quot;,&quot;http://ape.webingenia.com/Source/Core/Core.js&quot;,&quot;http://ape.webingenia.com/Source/Pipe/Pipe.js&quot;,&quot;http://ape.webingenia.com/Source/Pipe/PipeProxy.js&quot;,&quot;http://ape.webingenia.com/Source/Pipe/PipeMulti.js&quot;,&quot;http://ape.webingenia.com/Source/Pipe/PipeSingle.js&quot;,&quot;http://ape.webingenia.com/Source/Request/Request.js&quot;,&quot;http://ape.webingenia.com/Source/Request/Request.Stack.js&quot;,&quot;http://ape.webingenia.com/Source/Request/Request.CycledStack.js&quot;,&quot;http://ape.webingenia.com/Source/Transport/Transport.longPolling.js&quot;,&quot;http://ape.webingenia.com/Source/Transport/Transport.SSE.js&quot;,&quot;http://ape.webingenia.com/Source/Transport/Transport.XHRStreaming.js&quot;,&quot;http://ape.webingenia.com/Source/Transport/Transport.JSONP.js&quot;,&quot;http://ape.webingenia.com/Source/Core/Utility.js&quot;,&quot;http://ape.webingenia.com/Source/Core/JSON.js&quot;,&quot;http://ape.webingenia.com/Source/Core/Session.js&quot;]}}]
&lt;-- (useless html response)
&nbsp;
// We  try some &quot;CONNECT&quot; and then &quot;JOIN&quot; commands with the name &quot;superfc&quot;
--&gt; [{&quot;cmd&quot;:&quot;CONNECT&quot;,&quot;chl&quot;:1,&quot;params&quot;:{&quot;name&quot;:&quot;superfc&quot;}},{&quot;cmd&quot;:&quot;JOIN&quot;,&quot;chl&quot;:2,&quot;params&quot;:{&quot;channels&quot;:&quot;test&quot;}}]
// Error, the nick name is already use
&lt;-- [{&quot;time&quot;:&quot;1260119123&quot;,&quot;raw&quot;:&quot;ERR&quot;,&quot;data&quot;:{&quot;code&quot;:&quot;005&quot;,&quot;value&quot;:&quot;NICK_USED&quot;}}]
&nbsp;
// We  try some &quot;CONNECT&quot; and then &quot;JOIN&quot; commands with the name &quot;Florent&quot;
--&gt; [{&quot;cmd&quot;:&quot;CONNECT&quot;,&quot;chl&quot;:5,&quot;params&quot;:{&quot;name&quot;:&quot;Hello&quot;}},{&quot;cmd&quot;:&quot;JOIN&quot;,&quot;chl&quot;:6,&quot;params&quot;:{&quot;channels&quot;:&quot;test&quot;}}]
// This works !
&lt;-- [{&quot;time&quot;:&quot;1260119134&quot;,&quot;raw&quot;:&quot;LOGIN&quot;,&quot;data&quot;:{&quot;sessid&quot;:&quot;36a60d006d50882d0d2cd6bcfda90cb9&quot;}},
{&quot;time&quot;:&quot;1260119134&quot;,&quot;raw&quot;:&quot;IDENT&quot;,&quot;data&quot;:{&quot;user&quot;:{&quot;casttype&quot;:&quot;uni&quot;,&quot;pubid&quot;:&quot;8b5fec5af11df915d9806a3be4b46c35&quot;,&quot;properties&quot;:{&quot;name&quot;:&quot;Hello&quot;}}}},
{&quot;time&quot;:&quot;1260119134&quot;,&quot;raw&quot;:&quot;CHANNEL&quot;,&quot;data&quot;:{&quot;users&quot;:[{&quot;casttype&quot;:&quot;uni&quot;,&quot;pubid&quot;:&quot;8b5fec5af11df915d9806a3be4b46c35&quot;,&quot;properties&quot;:{&quot;name&quot;:&quot;Hello&quot;},&quot;level&quot;:1},{&quot;casttype&quot;:&quot;uni&quot;,&quot;pubid&quot;:&quot;cc03a08f304a75cc133827c6c4b561c8&quot;,&quot;properties&quot;:{&quot;name&quot;:&quot;superfc&quot;},&quot;level&quot;:1},{&quot;casttype&quot;:&quot;uni&quot;,&quot;pubid&quot;:&quot;541e78a0fbfbc08457c800aacccd212d&quot;,&quot;properties&quot;:{&quot;name&quot;:&quot;Florent&quot;},&quot;level&quot;:1}],&quot;pipe&quot;:{&quot;casttype&quot;:&quot;multi&quot;,&quot;pubid&quot;:&quot;2b27244bdb42c193d5158e818ec577d0&quot;,&quot;properties&quot;:{&quot;name&quot;:&quot;test&quot;}}}}]
&nbsp;
// We send 
--&gt; [{&quot;cmd&quot;:&quot;SESSION&quot;,&quot;chl&quot;:7,&quot;params&quot;:{&quot;action&quot;:&quot;set&quot;,&quot;values&quot;:{&quot;currentPipe&quot;:&quot;2b27244bdb42c193d5158e818ec577d0&quot;}},&quot;sessid&quot;:&quot;36a60d006d50882d0d2cd6bcfda90cb9&quot;}]
&lt;-- [{&quot;time&quot;:&quot;1260119136&quot;,&quot;raw&quot;:&quot;LEFT&quot;,&quot;data&quot;:{&quot;user&quot;:{&quot;casttype&quot;:&quot;uni&quot;,&quot;pubid&quot;:&quot;cc03a08f304a75cc133827c6c4b561c8&quot;,&quot;properties&quot;:{&quot;name&quot;:&quot;superfc&quot;}},&quot;pipe&quot;:{&quot;casttype&quot;:&quot;multi&quot;,&quot;pubid&quot;:&quot;2b27244bdb42c193d5158e818ec577d0&quot;,&quot;properties&quot;:{&quot;name&quot;:&quot;test&quot;}}}}]
&nbsp;
// These next requests are long polls with nothing
--&gt; [{&quot;cmd&quot;:&quot;CHECK&quot;,&quot;chl&quot;:9,&quot;sessid&quot;:&quot;36a60d006d50882d0d2cd6bcfda90cb9&quot;}]
&nbsp;
// Nothing new
&lt;-- [{&quot;time&quot;:&quot;1260119186&quot;,&quot;raw&quot;:&quot;CLOSE&quot;,&quot;data&quot;:{&quot;value&quot;:&quot;null&quot;}}]
&nbsp;
--&gt; [{&quot;cmd&quot;:&quot;CHECK&quot;,&quot;chl&quot;:10,&quot;sessid&quot;:&quot;36a60d006d50882d0d2cd6bcfda90cb9&quot;}]
&lt;-- [{&quot;time&quot;:&quot;1260119211&quot;,&quot;raw&quot;:&quot;CLOSE&quot;,&quot;data&quot;:{&quot;value&quot;:&quot;null&quot;}}]
&nbsp;
--&gt; [{&quot;cmd&quot;:&quot;CHECK&quot;,&quot;chl&quot;:11,&quot;sessid&quot;:&quot;36a60d006d50882d0d2cd6bcfda90cb9&quot;}]
&lt;-- [{&quot;time&quot;:&quot;1260119239&quot;,&quot;raw&quot;:&quot;CLOSE&quot;,&quot;data&quot;:{&quot;value&quot;:&quot;null&quot;}}]
&nbsp;
// We send some text (&quot;hello&quot;)
--&gt; [{&quot;cmd&quot;:&quot;SEND&quot;,&quot;chl&quot;:19,&quot;params&quot;:{&quot;msg&quot;:&quot;Hello hello&quot;,&quot;pipe&quot;:&quot;2b27244bdb42c193d5158e818ec577d0&quot;},&quot;sessid&quot;:&quot;36a60d006d50882d0d2cd6bcfda90cb9&quot;}]
// And we receive it (&quot;hello&quot;)
&lt;-- [{&quot;time&quot;:&quot;1260119399&quot;,&quot;raw&quot;:&quot;DATA&quot;,&quot;data&quot;:{&quot;msg&quot;:&quot;hello&quot;,&quot;from&quot;:{&quot;casttype&quot;:&quot;uni&quot;,&quot;pubid&quot;:&quot;541e78a0fbfbc08457c800aacccd212d&quot;,&quot;properties&quot;:{&quot;name&quot;:&quot;Florent&quot;}},&quot;pipe&quot;:{&quot;casttype&quot;:&quot;multi&quot;,&quot;pubid&quot;:&quot;2b27244bdb42c193d5158e818ec577d0&quot;,&quot;properties&quot;:{&quot;name&quot;:&quot;test&quot;}}}}]</pre></td></tr></table></div>

<p>If you don&#8217;t understand what is long polling, please look at <a href="http://florent.clairambault.fr/push-comet-or-pull#long_pollmy">previous post on the subject</a>.</p>
<p>Please not that that the &#8220;CLOSE&#8221; RAW isn&#8217;t some sort of &#8220;session closed&#8221; message. I&#8217;m not sure this it&#8217;s what the developer planned but right now it only means that there&#8217;s nothing to receive. So if you get that, don&#8217;t panic. Everything is working fine.</p>
<p><strong>If you need any help&#8230;</strong><br />
Please, don&#8217;t hesitate add some question in the comments, I&#8217;ll be happy to help you.</p>
]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/ajax-push-engine-1-0beta5/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.123 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-07-29 16:48:59 -->
