Skip to main content
AMSDeveloper-gbPS9Y
Participating Frequently
Aug 24, 2015 6:31 PM UTC
Question

Need some clarification on XmlSocket.onData

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 is closed to new replies. Start a new post to keep the conversation going.

4 replies

Adobe Employee
Aug 27, 2015 5:35 AM UTC

Hi,

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

Translate
AMSDeveloper-gbPS9Y
Participating Frequently
Nov 4, 2015 9:08 PM UTC

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

Translate
AMSDeveloper-gbPS9Y
Participating Frequently
Nov 18, 2015 4:49 PM UTC

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

Translate