View Full Version : Not getting back XML from Server

07-28-2005, 01:37 AM
I am working with the socket server code from www.Shovemedia.com/multiserver.

I have verified that the server can receive the xml ok. And the server goes into the broadcast function below. however, my flash application doesn't seem to get xml (ie. trace doesn't run). I am running the swf programs and the server program on local host and my windows firewall is off.

Please shed some light on possible problem!

Action Script flash code:
xsock = new XMLSocket();
xsock.onConnect = sockConnect;
xsock.onClose = sockClose;
xsock.onXML = processXMLslate;
xsock.connect("", 9000);
processXMLslate = function (data) {
trace("xml "+data);
server code in java:
protected static void broadcast (Document xmlDoc) {
Enumeration e;
synchronized (handlers) {
while (e.hasMoreElements())
//System.out.println("slate test broadcast ");
XmlHandler c=(XmlHandler) e.nextElement ();
if (c.thisThreadRunning)
synchronized (c.o) {
XMLOutputter xmlOut = new XMLOutputter ();
xmlOut.output(xmlDoc, c.o) ;
c.o.write (0);
System.out.println("slate test broadcast "+xmlOut.toString());
catch (IOException ex)
//System.out.println ("BROADCAST FAILURE via IO X");