[Laszlo-dev] NetConnection Parameters on RTMPConnection
Max Carlson
max at openlaszlo.org
Mon Dec 28 12:02:08 PST 2009
On 12/24/09 1:41 PM, Lucas Lain wrote:
> Hello Everybody,
>
> I'm trying to modify the class rtmpconnection to allow connection parameters.
> I can't get the parameters to work. I tried to sniff the tcp
> connection (I'm using rtmpt), but I can't see the parameters on the
> tcp stream. I'm using red5 on the other side, and the server says that
> the parameters received are 0. I think that the parameters are not
> working on my SWF side.
>
> Can you help me debug where my problem is? I ran out of ideas about
> where to look. I can't look inside NetConnection (_nc).
>
> I'm using OL 4.6.1.
>
> On my SWF client:
>
> var connParams = new Array();
> connParams["key"] = 'KEY1234124231';
> rtmp.connect(connParams);
>
>
> I modified two lines (the ones that say "HERE"). Here is the extracted
> code from rtmpconnection.lzx :
>
> <!--- Connect to the rtmp server. -->
> <method name="connect" args="connParams"><![CDATA[ //<-- HERE
> //Debug.write("rtmpconnection.connect, stage", this.stage);
> if (this.stage> 0) {
> return; // already connected or connecting
> }
>
> var src = this._usealtsrc ? this.altsrc : this.src;
> if (src == 'null') src = null;
>
> if (this.debug) {
> if ($debug) Debug.write("initiating connection to ", src);
> }
>
> if ($debug) {
> if (src == "") {
> Debug.write("no src url defined for", this);
> return;
> } else if (typeof(src) != "string") {
> Debug.write("src", src, "must be a string in", this);
> return;
> }
> }
>
> this._connecturl = src;
>
> this._createconnection();
> Debug.write(connParams);
> this._nc.connect(src,connParams);
> ///////////////////<-- HERE
> // I think the only option is to ethereal
>
> this.setAttribute("status", "connecting");
> this.setAttribute("stage", 1);
> if (! this['_connectionTimeoutDel'])
> this._connectionTimeoutDel = new LzDelegate(this,
> '_handleConnectionTimeout');
> lz.Timer.addTimer( this._connectionTimeoutDel,
> this.connectiontimeout );
> ]]>
> </method>
>
> Thanks in advance.
> Regards,
>
Please send me copies of your changes and I'll see if I can't get them
in as part of an upcoming release. It might make sense to have an
attribute just for this purpose...
--
Regards,
Max Carlson
OpenLaszlo.org
More information about the Laszlo-dev
mailing list