<?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 for Kilometer0.com Blog</title>
	<atom:link href="http://www.kilometer0.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kilometer0.com/blog</link>
	<description></description>
	<lastBuildDate>Fri, 29 Jul 2011 00:19:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>Comment on PHP XML Socket Server by Alexandru Petrescu</title>
		<link>http://www.kilometer0.com/blog/code/php-xml-socket-server/comment-page-1/#comment-46</link>
		<dc:creator>Alexandru Petrescu</dc:creator>
		<pubDate>Fri, 29 Jul 2011 00:19:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.kilometer0.com/blog/?page_id=71#comment-46</guid>
		<description>There are 2 &quot;servers&quot; one is the policy file server and one is the actual game / socket server.  Flash first connects to the policy server and grabs the policy file then disconnects.  It then tries to connect to the other port if the policy file allows it.</description>
		<content:encoded><![CDATA[<p>There are 2 &#8220;servers&#8221; one is the policy file server and one is the actual game / socket server.  Flash first connects to the policy server and grabs the policy file then disconnects.  It then tries to connect to the other port if the policy file allows it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on SWFAddress and AS3Signals by as3signals: new approach for AS3 Events &#124; All in one for social - Blog</title>
		<link>http://www.kilometer0.com/blog/code/swfaddress-and-as3signals/comment-page-1/#comment-45</link>
		<dc:creator>as3signals: new approach for AS3 Events &#124; All in one for social - Blog</dc:creator>
		<pubDate>Sun, 26 Jun 2011 10:44:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.kilometer0.com/blog/?page_id=108#comment-45</guid>
		<description>[...] SWFAddress as3signals version [...]</description>
		<content:encoded><![CDATA[<p>[...] SWFAddress as3signals version [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP XML Socket Server by Claudio Viola</title>
		<link>http://www.kilometer0.com/blog/code/php-xml-socket-server/comment-page-1/#comment-44</link>
		<dc:creator>Claudio Viola</dc:creator>
		<pubDate>Tue, 21 Jun 2011 16:04:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.kilometer0.com/blog/?page_id=71#comment-44</guid>
		<description>Hi
when I try to run my flash from browser php send crossdomain file to flash but flash don&#039;t connect to socket.

Where is my trouble?

These the logs of shell:
[2011-06-21] [SocketServer] NEW CLIENT Resource id #7 [IP: 127.0.0.1]
POLICY FILE REQUEST
[2011-06-21] [SocketServer] REMOVING CLIENT Resource id #7

Why removes the client?</description>
		<content:encoded><![CDATA[<p>Hi<br />
when I try to run my flash from browser php send crossdomain file to flash but flash don&#8217;t connect to socket.</p>
<p>Where is my trouble?</p>
<p>These the logs of shell:<br />
[2011-06-21] [SocketServer] NEW CLIENT Resource id #7 [IP: 127.0.0.1]<br />
POLICY FILE REQUEST<br />
[2011-06-21] [SocketServer] REMOVING CLIENT Resource id #7</p>
<p>Why removes the client?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP XML Socket Server by ed_01</title>
		<link>http://www.kilometer0.com/blog/code/php-xml-socket-server/comment-page-1/#comment-43</link>
		<dc:creator>ed_01</dc:creator>
		<pubDate>Wed, 20 Apr 2011 06:16:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.kilometer0.com/blog/?page_id=71#comment-43</guid>
		<description>Hi Alexandru,  Is this post still being supported?  I&#039;m new to sockets and trying to get your example up and running.  I can see that I have the policy socket and socket server running on localhost with netstat -a at cmd, so it appears the sockets are working okay (on 127.0.0.1) and I have altered the crossdomain.xml file to allow &quot;*&quot; and placed in the root of my localhost.  When I publish the SWF / HTML I get a number of errors (7), which all state &quot;1046: Type was not found or was not a compile-time constant: SocketResponseEvent.&quot;  For things like OnConnected, OnJoinedGame, etc.  I have posted on the Adobe forums regarding sockets before and found little help.  Yours seems one of the best examples out there, so I would really like to get it running.
As you&#039;ve been running and implementing it for so long I&#039;m sure it&#039;s something I&#039;m doing wrong.  Any guidance would be greatly appreciated.
Best Regards</description>
		<content:encoded><![CDATA[<p>Hi Alexandru,  Is this post still being supported?  I&#8217;m new to sockets and trying to get your example up and running.  I can see that I have the policy socket and socket server running on localhost with netstat -a at cmd, so it appears the sockets are working okay (on 127.0.0.1) and I have altered the crossdomain.xml file to allow &#8220;*&#8221; and placed in the root of my localhost.  When I publish the SWF / HTML I get a number of errors (7), which all state &#8220;1046: Type was not found or was not a compile-time constant: SocketResponseEvent.&#8221;  For things like OnConnected, OnJoinedGame, etc.  I have posted on the Adobe forums regarding sockets before and found little help.  Yours seems one of the best examples out there, so I would really like to get it running.<br />
As you&#8217;ve been running and implementing it for so long I&#8217;m sure it&#8217;s something I&#8217;m doing wrong.  Any guidance would be greatly appreciated.<br />
Best Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP XML Socket Server by inckie.lucifer</title>
		<link>http://www.kilometer0.com/blog/code/php-xml-socket-server/comment-page-1/#comment-42</link>
		<dc:creator>inckie.lucifer</dc:creator>
		<pubDate>Sat, 08 Jan 2011 16:36:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.kilometer0.com/blog/?page_id=71#comment-42</guid>
		<description>Do you have any documentation on the server part?</description>
		<content:encoded><![CDATA[<p>Do you have any documentation on the server part?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Lithium (LI3) and JSONP by List of useful Lithium (Li3) resources &#171; Web mellom fjell</title>
		<link>http://www.kilometer0.com/blog/2010/11/23/lithium-li3-and-jsonp/comment-page-1/#comment-41</link>
		<dc:creator>List of useful Lithium (Li3) resources &#171; Web mellom fjell</dc:creator>
		<pubDate>Thu, 06 Jan 2011 13:14:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.kilometer0.com/blog/?p=133#comment-41</guid>
		<description>[...] Lithium (Li3) and JSONP [...]</description>
		<content:encoded><![CDATA[<p>[...] Lithium (Li3) and JSONP [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on SWFAddress + AS3Signals + RobotLegs by Matt Perkins</title>
		<link>http://www.kilometer0.com/blog/2010/03/02/swfaddress-as3signals-robotlegs/comment-page-1/#comment-40</link>
		<dc:creator>Matt Perkins</dc:creator>
		<pubDate>Fri, 31 Dec 2010 02:55:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.kilometer0.com/blog/?p=114#comment-40</guid>
		<description>This was very helpful for me, thanks! Saved me time.</description>
		<content:encoded><![CDATA[<p>This was very helpful for me, thanks! Saved me time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP XML Socket Server by hophuong</title>
		<link>http://www.kilometer0.com/blog/code/php-xml-socket-server/comment-page-1/#comment-39</link>
		<dc:creator>hophuong</dc:creator>
		<pubDate>Mon, 27 Dec 2010 03:57:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.kilometer0.com/blog/?page_id=71#comment-39</guid>
		<description>i want to make a simple chat app base on flex air and php socket server. here is my test code
socketserver.php

print &quot;Starting Socket Server...\n&quot;; 
    
	$host = &quot;localhost&quot;; 
    $port = &quot;8080&quot;; 
    $max_users = 10; 
	error_reporting(E_ALL);
	set_time_limit(0);
	ob_implicit_flush();
    $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
	if (!socket_set_option($sock, SOL_SOCKET, SO_REUSEADDR, 1)) {
		echo &#039;Unable to set option on socket: &#039;. socket_strerror(socket_last_error());
	} else {
		echo &quot;Set options on socket.\n&quot;;
	}
    socket_bind($sock, $host, $port); 
    socket_listen($sock, $max_users); 
    $childSocket = socket_accept($sock);
    $incomingData = socket_read($childSocket, 2048); 
	print &quot;----&quot;.substr($incomingData, 0, -2);
    if (substr($incomingData, 0, -2) == &quot;respo&quot;) { 
        $response = &quot;Server Response &gt; I am here!\n&quot;; 
		print &quot;11111\n&quot;;
        socket_write($childSocket, $response, strlen($response)); 
    }else{
		print &quot;22222\n&quot;;
	}

and here is my as3 code:


    
        &lt;![CDATA[
            private var server:String = &quot;localhost&quot;;
            private var port:Number = 8080; 
            private var socket:Socket;
            private function init():void {
                socket = new Socket();
                
                socket.addEventListener(Event.CONNECT, onConnect);
                socket.addEventListener(Event.CLOSE, onClose);
                socket.addEventListener(ErrorEvent.ERROR, onError);
                socket.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
                socket.addEventListener(ProgressEvent.SOCKET_DATA, onResponse);
                //Security.allowDomain(&quot;*&quot;);
                //Security.loadPolicyFile(&quot;http://&quot;+server+&quot;/crossdomain.xml&quot;);
                try {
                    socket.connect(server, port);
                    outMessage(&quot;Trying to connect to &quot;+server+&quot;:&quot;+port);
                } catch (error:Error) {
                    outMessage(&quot;3333333333333333333333&quot;);
                    socket.close();
                    outMessage(error.message); 
                }
                
            }
            public function send(string:String):void {
                socket.writeUTFBytes(string);
                socket.flush();
            }
            private function onConnect(event:Event):void {
                outMessage(&quot;Connected to &quot;+server+&quot;:&quot;+port);
                send(&quot;respond&quot;);
            }
            private function onClose(event:Event):void {
                outMessage(&quot;Connection closed&quot;);
            }
            private function onError(event:IOErrorEvent):void {
                outMessage(&quot;Connection error&quot;);
            }
            private function onIOError(event:IOErrorEvent):void {
                outMessage(&quot;I/O error&quot;);
            }
            private function onResponse(event:ProgressEvent):void {
            	outMessage(&quot;onResponse&quot;);
                var string:String = socket.readUTFBytes(socket.bytesAvailable);
                outMessage(string);
            }
            public function outMessage(msg:String):void {
                log.htmlText += &#039;&#039;+msg+&#039;&#039;;
            }
            public function send_message(event:MouseEvent):void{
            	send(txt_input.text);
            }
        ]]&gt;
    
    
    	
		
		
    
    


first time connect to socket server is ok. but the socket is close auto after the first time i call socket_write($childSocket, $response, strlen($response));
it take me alot of time to debug but still is a secret.
please help me!</description>
		<content:encoded><![CDATA[<p>i want to make a simple chat app base on flex air and php socket server. here is my test code<br />
socketserver.php</p>
<p>print &#8220;Starting Socket Server&#8230;\n&#8221;; </p>
<p>	$host = &#8220;localhost&#8221;;<br />
    $port = &#8220;8080&#8243;;<br />
    $max_users = 10;<br />
	error_reporting(E_ALL);<br />
	set_time_limit(0);<br />
	ob_implicit_flush();<br />
    $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);<br />
	if (!socket_set_option($sock, SOL_SOCKET, SO_REUSEADDR, 1)) {<br />
		echo &#8216;Unable to set option on socket: &#8216;. socket_strerror(socket_last_error());<br />
	} else {<br />
		echo &#8220;Set options on socket.\n&#8221;;<br />
	}<br />
    socket_bind($sock, $host, $port);<br />
    socket_listen($sock, $max_users);<br />
    $childSocket = socket_accept($sock);<br />
    $incomingData = socket_read($childSocket, 2048);<br />
	print &#8220;&#8212;-&#8221;.substr($incomingData, 0, -2);<br />
    if (substr($incomingData, 0, -2) == &#8220;respo&#8221;) {<br />
        $response = &#8220;Server Response &gt; I am here!\n&#8221;;<br />
		print &#8220;11111\n&#8221;;<br />
        socket_write($childSocket, $response, strlen($response));<br />
    }else{<br />
		print &#8220;22222\n&#8221;;<br />
	}</p>
<p>and here is my as3 code:</p>
<p>        &lt;![CDATA[<br />
            private var server:String = &quot;localhost&quot;;<br />
            private var port:Number = 8080;<br />
            private var socket:Socket;<br />
            private function init():void {<br />
                socket = new Socket();</p>
<p>                socket.addEventListener(Event.CONNECT, onConnect);<br />
                socket.addEventListener(Event.CLOSE, onClose);<br />
                socket.addEventListener(ErrorEvent.ERROR, onError);<br />
                socket.addEventListener(IOErrorEvent.IO_ERROR, onIOError);<br />
                socket.addEventListener(ProgressEvent.SOCKET_DATA, onResponse);<br />
                //Security.allowDomain(&quot;*&quot;);<br />
                //Security.loadPolicyFile(&quot;http://&quot;+server+&quot;/crossdomain.xml&quot;);<br />
                try {<br />
                    socket.connect(server, port);<br />
                    outMessage(&quot;Trying to connect to &quot;+server+&quot;:&quot;+port);<br />
                } catch (error:Error) {<br />
                    outMessage(&quot;3333333333333333333333&quot;);<br />
                    socket.close();<br />
                    outMessage(error.message);<br />
                }</p>
<p>            }<br />
            public function send(string:String):void {<br />
                socket.writeUTFBytes(string);<br />
                socket.flush();<br />
            }<br />
            private function onConnect(event:Event):void {<br />
                outMessage(&quot;Connected to &quot;+server+&quot;:&quot;+port);<br />
                send(&quot;respond&quot;);<br />
            }<br />
            private function onClose(event:Event):void {<br />
                outMessage(&quot;Connection closed&quot;);<br />
            }<br />
            private function onError(event:IOErrorEvent):void {<br />
                outMessage(&quot;Connection error&quot;);<br />
            }<br />
            private function onIOError(event:IOErrorEvent):void {<br />
                outMessage(&quot;I/O error&quot;);<br />
            }<br />
            private function onResponse(event:ProgressEvent):void {<br />
            	outMessage(&quot;onResponse&quot;);<br />
                var string:String = socket.readUTFBytes(socket.bytesAvailable);<br />
                outMessage(string);<br />
            }<br />
            public function outMessage(msg:String):void {<br />
                log.htmlText += &#039;'+msg+'';<br />
            }<br />
            public function send_message(event:MouseEvent):void{<br />
            	send(txt_input.text);<br />
            }<br />
        ]]&gt;</p>
<p>first time connect to socket server is ok. but the socket is close auto after the first time i call socket_write($childSocket, $response, strlen($response));<br />
it take me alot of time to debug but still is a secret.<br />
please help me!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Lithium (LI3) and JSONP by Tweets that mention Lithium (LI3) and JSONP « Kilometer0.com Blog -- Topsy.com</title>
		<link>http://www.kilometer0.com/blog/2010/11/23/lithium-li3-and-jsonp/comment-page-1/#comment-38</link>
		<dc:creator>Tweets that mention Lithium (LI3) and JSONP « Kilometer0.com Blog -- Topsy.com</dc:creator>
		<pubDate>Wed, 24 Nov 2010 18:45:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.kilometer0.com/blog/?p=133#comment-38</guid>
		<description>[...] This post was mentioned on Twitter by Alex Petrescu, Hari K T. Hari K T said: RT @SeyelentEco: New Blog/Code Post: Lithium PHP Framework #li3 and JSONP http://bit.ly/f4aR4E #php #webdev [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Alex Petrescu, Hari K T. Hari K T said: RT @SeyelentEco: New Blog/Code Post: Lithium PHP Framework #li3 and JSONP <a href="http://bit.ly/f4aR4E" rel="nofollow">http://bit.ly/f4aR4E</a> #php #webdev [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Twitter Status URL&#8217;s and Ampersands by Felipe Roberto</title>
		<link>http://www.kilometer0.com/blog/2010/01/21/twitter-status-urls-and-ampersands/comment-page-1/#comment-37</link>
		<dc:creator>Felipe Roberto</dc:creator>
		<pubDate>Wed, 25 Aug 2010 19:19:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.kilometer0.com/blog/?p=100#comment-37</guid>
		<description>I was looking for this for a long time. And just now I found.
Thanks.

this part of comment is to ranking on google in my language(you can edit).

Problema de encodação com link para compartilhar no twitter resolvido. O problema esta no redirect que o twitter faz quando você tenta usar o home/status? com www na url do twitter e ele re-encoda os caracteres.</description>
		<content:encoded><![CDATA[<p>I was looking for this for a long time. And just now I found.<br />
Thanks.</p>
<p>this part of comment is to ranking on google in my language(you can edit).</p>
<p>Problema de encodação com link para compartilhar no twitter resolvido. O problema esta no redirect que o twitter faz quando você tenta usar o home/status? com www na url do twitter e ele re-encoda os caracteres.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

