powered by Jive Software

Adding a sendRaw() method to the XMPPConnection class

Hi Sean Voisen and other creators of the XIFF library.

Sean, I know that I mentioned this in an email to you a little while ago, but thought I would ask again here in the forum where others can add their input as well.

Would it be possible to add a debugging method to the XMPPConnection class so that developers can send a raw string or XML object to the XMPP server if needed?

This is what I have added in my altered version:

public function sendRaw(xml:Object):Void {

sendXML(xml);

}

It simply exposes the sendXML() method.

This has been extremely useful for me to write test clients to be able to send the raw XMPP message to see how different servers deal with it. For example, I ended up doing this a while ago when trying to figure out the whole stream:stream, flash:stream, terminated, not terminated versions of that. Anyway, that was just one example of where it was useful and there have been many more since then.

Let me know your thoughts when you get a chance.

Also, I’‘m curious why you didn’‘t just type the someData parameter in the sendXML() method as Object instead of not typing it. Doesn’'t that essentially do the same thing? No big deal either way though, just thought I would mention it.

Thanks,

Chris

Chris - that’‘s a good idea for a debugging method. I’'ll put it on the “to do” list.

As for typing things with Object, here’'s some explanation on that:

http://www.as2lib.org/blog/?p=16

Thanks for including the function in the next version.

And thanks for the info on using Object and interfaces. You learn something new everyday.

-Chris