<?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>netconnection &#8211; Alessandro Crugnola &#8211; sephiroth.it</title>
	<atom:link href="https://blog.sephiroth.it/tag/netconnection/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.sephiroth.it</link>
	<description>programmer by pure chance</description>
	<lastBuildDate>Wed, 28 Jul 2010 18:07:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://blog.sephiroth.it/wp-content/uploads/2019/03/cropped-sepy-big-32x32.png</url>
	<title>netconnection &#8211; Alessandro Crugnola &#8211; sephiroth.it</title>
	<link>https://blog.sephiroth.it</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>AMFPHP issue referencing ByteArray</title>
		<link>https://blog.sephiroth.it/2008/07/11/amfphp-issue-referencing-bytearray/</link>
					<comments>https://blog.sephiroth.it/2008/07/11/amfphp-issue-referencing-bytearray/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Fri, 11 Jul 2008 17:08:49 +0000</pubDate>
				<category><![CDATA[amfphp]]></category>
		<category><![CDATA[amf3]]></category>
		<category><![CDATA[blob]]></category>
		<category><![CDATA[bytearray]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[netconnection]]></category>
		<category><![CDATA[objectencoding]]></category>
		<category><![CDATA[patch]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=258</guid>

					<description><![CDATA[Recently I made some test in AMFPHP sending an retrieving ByteArray to be stored in a mysql blob field. But suddenly I encounter a problem when I was trying to return an array of ByteArrays and I could not find out the reason flash continued to show me this error: The php file which was &#8230; <a href="https://blog.sephiroth.it/2008/07/11/amfphp-issue-referencing-bytearray/" class="more-link">Continue reading <span class="screen-reader-text">AMFPHP issue referencing ByteArray</span></a>]]></description>
										<content:encoded><![CDATA[<p>Recently I made some test in AMFPHP sending an retrieving ByteArray to be stored in a mysql blob field.</p>
<p>But suddenly I encounter a problem when I was trying to return an array of ByteArrays and I could not find out the reason flash continued to show me this error:</p>
<p><a href="https://blog.sephiroth.it/wp-content/uploads/2008/07/error_dialog.png"><img decoding="async" class="alignnone size-medium wp-image-1117" title="error_dialog" src="https://blog.sephiroth.it/wp-content/uploads/2008/07/error_dialog-300x126.png" alt="" width="300" height="126" srcset="https://blog.sephiroth.it/wp-content/uploads/2008/07/error_dialog-300x126.png 300w, https://blog.sephiroth.it/wp-content/uploads/2008/07/error_dialog.png 658w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>The php file which was generating this error was:<br />
<code lang="php"><br />
class Service<br />
{<br />
public function getArray( )<br />
{<br />
$GLOBALS['amfphp']['encoding'] = 'amf3';<br />
$a = new ByteArray("\x00\x10this is a string");<br />
$b = new ByteArray("\x00\x16this is another string");<br />
$c = $a;<br />
return array( $a, $b, $c );<br />
}<br />
}<br />
</code><br />
While the Actionscript test class was:<br />
<code><br />
package<br />
{<br />
    import flash.display.Sprite;<br />
    import flash.net.NetConnection;<br />
    import flash.net.ObjectEncoding;<br />
    import flash.net.Responder;<br />
    import flash.utils.ByteArray;</p>
<p>    public class test extends Sprite<br />
    {<br />
        private var nc: NetConnection;<br />
        private var rsp: Responder;</p>
<p>        public function test()<br />
        {<br />
            rsp = new Responder( onResult, null );<br />
            nc = new NetConnection();<br />
            nc.objectEncoding = ObjectEncoding.AMF3;<br />
            nc.connect( "http://localhost/amfphp/trunk/gateway.php" );<br />
            nc.call( "test.bytearray.Service.getArray", rsp );<br />
        }</p>
<p>        private function onResult( e: * ): void<br />
        {<br />
            if ( e is Array )<br />
            {<br />
                for each ( var b: ByteArray in( e as Array ) )<br />
                {<br />
                    trace( 'reading bytearray...' );<br />
                    b.position = 0;<br />
                    trace( b.readUTF() );<br />
                }<br />
            }<br />
        }<br />
    }<br />
}</p>
<p></code><br />
After some investigation I found that the error was into the AMFSerializer.php file in the writeAmf3ByteArray method which doesn&#8217;t reference correctly the bytearray objects.</p>
<p>Thus I made a little modification and after that I succeeded to retrieve correctly the bytearray list ( with the 3rd element as reference of the first one ).</p>
<p>Here you can <a title="bytearray.patch" href="https://blog.sephiroth.it/wp-content/uploads/2008/07/bytearray_patch.zip">download the patch file</a>, if you want to test the modification ( at your own risk 🙂 ). The patch has been created using the last svn version of amfphp and you can apply the patch with the following command:<br />
<code>patch -p0 -i bytearray.patch</code></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2008/07/11/amfphp-issue-referencing-bytearray/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>NetConnection Debugger Alternates</title>
		<link>https://blog.sephiroth.it/2005/12/16/netconnection-debugger-alternates/</link>
					<comments>https://blog.sephiroth.it/2005/12/16/netconnection-debugger-alternates/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Fri, 16 Dec 2005 19:05:32 +0000</pubDate>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[netconnection]]></category>
		<category><![CDATA[proxy]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=121</guid>

					<description><![CDATA[Today I&#8217;ve started a new Flash project which will also involve Flash Remoting. So I decided to try this ServiceCapture tools for debugging the amf messages as replacement of the builtin NetConnection debugger. I&#8217;m really suck of the flash NetConnection Debugger (it works 50% of the times for me). Sometimes I need to close and &#8230; <a href="https://blog.sephiroth.it/2005/12/16/netconnection-debugger-alternates/" class="more-link">Continue reading <span class="screen-reader-text">NetConnection Debugger Alternates</span></a>]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="alignleft" style="margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; border: 0px initial initial;" src="http://kevinlangdon.com/serviceCapture/images/ss_small_amf.jpg" border="0" alt="" width="120" height="101" />Today I&#8217;ve started a new Flash project which will also involve Flash Remoting.<br />
So I decided to try this <strong>ServiceCapture</strong> tools for debugging the amf messages as replacement of the builtin NetConnection debugger.<br />
I&#8217;m really suck of the flash NetConnection Debugger (it works 50% of the times for me). Sometimes I need to close and re-open it in order to make it works again, sometimes it doesnt display anything at all&#8230;<br />
Btw, ServiceCapture can capture every kind of HTTP traffic, not only remoting calls and it has also a bandwidth simulation feature. (and these are cool features)<br />
However the full license costs $34.99, which is not so cheap for this kind of tool.<br />
<a href="http://kevinlangdon.com/serviceCapture/">http://kevinlangdon.com/serviceCapture/</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2005/12/16/netconnection-debugger-alternates/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>AMFPHP &#038; NetConnection Call.BadVersion</title>
		<link>https://blog.sephiroth.it/2004/06/04/amfphp-netconnection-call-badversion/</link>
					<comments>https://blog.sephiroth.it/2004/06/04/amfphp-netconnection-call-badversion/#comments</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Fri, 04 Jun 2004 19:19:46 +0000</pubDate>
				<category><![CDATA[amfphp]]></category>
		<category><![CDATA[netconnection]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=12</guid>

					<description><![CDATA[If you used at least one time AMFPHP you probably had already encountered the NetConnection Call.BadVersion message. This seems to be a very common issue for anyone who&#8217;s beginnig to develop with Flash Remoting in PHP. In fact I often read message from guys who had this this error while trying to use AMFPHP remoting. &#8230; <a href="https://blog.sephiroth.it/2004/06/04/amfphp-netconnection-call-badversion/" class="more-link">Continue reading <span class="screen-reader-text">AMFPHP &#038; NetConnection Call.BadVersion</span></a>]]></description>
										<content:encoded><![CDATA[<p>If you used at least one time <a href="http://www.amfphp.org/">AMFPHP</a> you probably had already encountered the NetConnection <strong>Call.BadVersion</strong> message.<br />
This seems to be a very common issue for anyone who&#8217;s beginnig to develop with Flash Remoting in PHP. In fact I often read message from guys who had this this error while trying to use AMFPHP remoting.<br />
The reasons of this error are often the same or at least similar, for this reason I thought to create a page on the <a href="http://www.sephiroth.it/phpwiki/">wiki</a> space about this problem.<br />
This is a list of all the common situation where the Call.BadVersion appears. I get most of the poits reading people&#8217;s posts and I hope you will contribute to create <strong><a href="http://www.sephiroth.it/phpwiki/index.php/Call.BadVersion">the most comprehensive list about this common problem</a></strong>.</p>
<p>Other useful resources about AMFPHP:<br />
<a href="http://www.sephiroth.it/tutorials/flashPHP/amfphp_installation/">AMFPHP installation guide</a><br />
<a href="http://www.flash-db.com/Tutorials/hello/flashamfphp.php">Flash-DB tutorial</a><br />
<a href="http://www.amfphp.org/?g=documentation">Installation tips on amfphp.org</a></p>
<p>Link:  <a href="http://www.sephiroth.it/phpwiki/index.php/Call.BadVersion"> http://www.sephiroth.it/phpwiki/index.php/Call.BadVersion </a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2004/06/04/amfphp-netconnection-call-badversion/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
