<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -14,7 +14,7 @@ class JsSocket {
 
   static function main() {
     id = flash.Lib.current.loaderInfo.parameters.id;
-    sizedReads = flash.Lib.current.loaderInfo.parameters.sizedReads ? true : false;
+    sizedReads = flash.Lib.current.loaderInfo.parameters.sizedReads;
 
     flash.external.ExternalInterface.addCallback(&quot;open&quot;, open);
     flash.external.ExternalInterface.addCallback(&quot;send&quot;, send);</diff>
      <filename>flash/JsSocket.hx</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>flash/jsSocket2.swf</filename>
    </modified>
    <modified>
      <diff>@@ -35,6 +35,11 @@ jsSocket.prototype = {
   host: null,     // host == null means window.location.hostname
   port: null,     // port to connect to (443 is recommended to get through firewalls)
 
+  // toggle packet reading mode between null terminated or size prefixed
+  // null terminated is the default to be bacwards compatible with flash8/AS2s XMLSocket
+  // flash9/AS3 supports size prefixed mode which allows sending raw data without base64
+  sizedReads: false,
+
   init: function(opts) {
     var self = this
 
@@ -68,7 +73,7 @@ jsSocket.prototype = {
                                           width: 1,
                                           height: 1,
                                           params: { id: self.id },
-                                          flashvars: { id: self.id }
+                                          flashvars: { id: self.id, sizedReads: self.sizedReads }
                                        })
 
       $(window).bind('beforeunload', function(){</diff>
      <filename>js/jsSocket.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2470f2fb3db1d08b056425c0e2d573c5ec747a3a</id>
    </parent>
  </parents>
  <author>
    <name>Aman Gupta</name>
    <email>aman@pluto.omgxd.com</email>
  </author>
  <url>http://github.com/tmm1/jssocket/commit/256ea7f4b14697893f7f269bc03471cd8b596385</url>
  <id>256ea7f4b14697893f7f269bc03471cd8b596385</id>
  <committed-date>2008-12-18T16:35:13-08:00</committed-date>
  <authored-date>2008-12-18T16:35:13-08:00</authored-date>
  <message>sizedReads option can be passed into the jsSocket constructor</message>
  <tree>ef44d2ba49aa757e42663d5f75964f74e3f41524</tree>
  <committer>
    <name>Aman Gupta</name>
    <email>aman@pluto.omgxd.com</email>
  </committer>
</commit>
