Skip to main content
Participating Frequently
March 26, 2010
Question

XMLSocket NULL byte generation

  • March 26, 2010
  • 1 reply
  • 743 views

Hi,

I'm trying to get an external script to communicate with an application instance running on my Flash Interactive Media Server installation.

I've got the following server side actionscript in my AppStart():

this.socket = new XMLSocket("test");

this.socket.onXML = function(object) {

       trace("got xml!");

};

this.socket.connect(null, 16005);

The connection to an open socket on the localhost, port 16005 works fine, but when I try to write some xml to the socket that I accepted the connection on (running on the localhost), I never seem to get the onXML or onData callbacks on the server application instance. One question that I had was regarding the NULL byte. If the FMS application doesn't not receive the NULL byte, does that mean the callback won't happen? If so, can someone tell me how to take something like a Python string and *add* a NULL byte so that the FMS will invoke the proper onXML or onData callback when this data is sent?

Thanks.

    This topic has been closed for replies.

    1 reply

    Asa_-_FMS
    Adobe Employee
    Adobe Employee
    March 26, 2010

    I can't comment on the Python side, but your assumption is correct that FMS is not delivering the data because it lacks the requisite null termination character.