Skip to main content
AMSDeveloper-gbPS9Y
Participating Frequently
August 24, 2015
Question

Need some clarification on XmlSocket.onData

  • August 24, 2015
  • 1 reply
  • 1707 views

Hi, I need some clarification about what's happening behind the scenes with the XmlSocket on AMS. The documentation is inconsistent with the behavior I'm seeing. Specifically the documentation states:

XmlSocket.onData(src)

Invoked when a message has been downloaded from the server, terminated by a zero (0) byte. You can override  XMLSocket.onData() to intercept the data sent by the server without parsing it as XML. This is useful if you’re transmitting arbitrarily formatted data packets and you would prefer to manipulate the data directly when it arrives, rather than have Flash Media Interactive Server parse the data as XML.

If I send a string across the connection like "Hello there!", my onData handler never gets called. I did make sure the stream was terminated with a zero byte. I also just tried sending a message with 0 length buffer and,  new lines and carriage return values as well to the ends of my strings all to no avail.

However, when I send a message like "<a>Hello there!</a>", my onData handler does get called. This leads me to believe that there is actually processing for the XML happening before onData is handled. The reason I'm asking, is that we are suffering seg faults while processing XML data, and are trying to get a lock on where/why.

I'm using AMS - 5.0.3 r3029 x64

AS3 Documentation

Adobe ActionScript 3.0 * Socket connections

FMS - XmlSocket Documentation

http://help.adobe.com/en_US/FlashMediaServer/4.0_SSASLR/WS5b3ccc516d4fbf351e63e3d11a11aff5ba-7c8f.html#WS5b3ccc516d4fbf351e63e3d11a11afc95e-7eea

This topic has been closed for replies.

1 reply

Adobe Employee
August 27, 2015

Hi,

Are you creating a "flash" type or "stream" type XML socket?

AMSDeveloper-gbPS9Y
Participating Frequently
November 4, 2015

I'm creating a 'stream' type XML Socket.

AMSDeveloper-gbPS9Y
Participating Frequently
November 18, 2015

Going to keep bumping until I hear something.... Adobe's help on these forums is pretty sad...