[Zmx-cvs-commit] zmx ZMX_XML.as,1.45,1.46
Brought to you by:
sspickle
|
From: Steve S. <ssp...@us...> - 2005-03-20 12:13:24
|
Update of /cvsroot/zmx/zmx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3379 Modified Files: ZMX_XML.as Log Message: improved notification on network return Index: ZMX_XML.as =================================================================== RCS file: /cvsroot/zmx/zmx/ZMX_XML.as,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** ZMX_XML.as 20 Mar 2005 03:15:43 -0000 1.45 --- ZMX_XML.as 20 Mar 2005 12:13:12 -0000 1.46 *************** *** 7,11 **** ** ** ! ** Rewrote all of this code to better suite my needs.. ** ** This code is inspired by two other efforts.. --- 7,11 ---- ** ** ! ** Rewrote all of this code to better suite ZMX needs.. ** ** This code is inspired by two other efforts.. *************** *** 19,34 **** ** The code the follows started more like the former, and ** ended up much more like the latter, but still has some ! ** decorations from the former. ! ** ! ** --------------------------------------------------- ! ** ! ** A major re-plumbing is happening since we discovered that ! ** DirectorMX doesn't set content-type headers in flash XMLRPC ! ** calls when Flash sprites are embedded in director movies. ** - ** As a work-around, we're allowing XMLRPC to be accessed via - ** a flash local-connetion server loaded in a web page (not - ** inside director) or a projector. This local-connection server - ** should be set up before running the director movie. ** ** sjs --- 19,25 ---- ** The code the follows started more like the former, and ** ended up much more like the latter, but still has some ! ** names from the former, though the implimentation is a ! ** complete re-write (see the CVS repository for details) ** ** ** sjs *************** *** 36,39 **** --- 27,39 ---- */ + // ------------------------------------------------------------------- + // + // the following #include is here, and the LConnXXX implementation is + // included here for historical/comatability reasons only. New Projects + // are strongly encouraged not to use the local connection proxy + // method since it's no longer being developed, or tested. + // + // ------------------------------------------------------------------- + #include "ZMX_LConnClient.as" *************** *** 63,72 **** // // config.configDelay = Boolean or number. If defined delay the configuration message. ! // If numeric use value for number of seconds to delay. // // config.send_ping = Boolean or number. If defined request pings from the // to help maintain/monitor a connection that may fail. ! // If numeric, use value to est ping delay interval (and ! // connection check interval // // config.use_LC_server Use a local connection rather than talking directly to --- 63,73 ---- // // config.configDelay = Boolean or number. If defined delay the configuration message. ! // If numeric use value for number of seconds to delay. Default ! // value is one second. // // config.send_ping = Boolean or number. If defined request pings from the // to help maintain/monitor a connection that may fail. ! // If numeric, use value to set the ping delay interval ! // (and connection check interval). Default value is 60 seconds. // // config.use_LC_server Use a local connection rather than talking directly to *************** *** 137,146 **** } this.registerInterval = SetInterval( this, "registerConnection", delayAmount); - return false; } else { this.send(this.config); ! return true; } } --- 138,147 ---- } this.registerInterval = SetInterval( this, "registerConnection", delayAmount); } else { this.send(this.config); ! this.configured = true; } + return this.configured; } *************** *** 151,156 **** // - this.configured = true; - var attr; --- 152,155 ---- *************** *** 197,215 **** } this.send(this.config); ! this.proxy.asyncConfigured( this.config ); } p.checkPingSuccess = function() { ! //trace("checking ping success.."); if (this.networkAvailable && !this.gotXMLSinceLastPing) { ! this.networkAvailable = false; ! this.proxy.networkAvailableStatus( this.networkAvailable) ! //trace("network no longer available.. "); } else if (!this.networkAvailable) { if (this.gotXMLSinceLastPing) { ! this.networkAvailable = true; ! this.proxy.networkAvailableStatus( this.networkAvailable) } else --- 196,220 ---- } this.send(this.config); ! ! if (!this.configured) { ! // ! // only send asyncConfigured once ! // ! this.proxy.asyncConfigured( this.config ); ! this.configured = true; ! } } p.checkPingSuccess = function() { ! // ! // check for async traffic since last check. ! // if (this.networkAvailable && !this.gotXMLSinceLastPing) { ! this.networkAvailableStatus( false ); } else if (!this.networkAvailable) { if (this.gotXMLSinceLastPing) { ! this.networkAvailableStatus(true); } else *************** *** 221,224 **** --- 226,234 ---- } + p.networkAvailableStatus = function( status ) { + this.networkAvailable = status; + this.proxy.networkAvailableStatus( this.networkAvailable); + } + p.send = function( theArgs, theMethod ) { // *************** *** 568,571 **** --- 578,584 ---- this.parentObj.gotXMLSinceLastPing = true; + if (!this.parentObj.networkAvailable) { + this.parentObj.networkAvailableStatus( true ); + } if (argObj.methodCall) { |