PDA

View Full Version : XMLSocket.connect(host, port) ????


sanjubawa
06-24-2001, 03:58 PM
Hi everyone,

i have just started making flash applications that interact with server daemons. i have a JAVA server running on port 9000 on my computer. However XMLSocket.connect("localhost",9000) or XMLSocket.connect("127.0.0.1",9000) return a "false" value.

i read the flash help file and i believe i have entered the parameters to the connect method in accordance with the restrictions specifed in the help file.

can someone please help.

VAYKENT
07-03-2001, 12:13 AM
So what exactly is the code you're using to connect?? I don't want to assume that you've created a new XMLSocket object....

sanjubawa
07-03-2001, 01:18 AM
i have used the following code for the Flash application and i am trying to connect to my java server app using the flash movie directly (not through a web server).




------------------------//Initializations
ColdSock.onConnect = myOnConnect;
ColdSock.onXML = myOnXML;
ColdSock.onClose = myOnClose;

//Bogus addie included free of charge!
ColdSock.connect("200.125.122.11", 6758);

--------------------function myOnConnect (success) {
if (success) {
connected = true;
} else {
connected = false;
}
}

function myOnXML (xobj) {
ColdParse(xobj);
}

function myOnClose () {
trace ("Oh ****! Connection closed!");
gotoAndStop("Err_Connect");
connected = false;
}


hope this clarifies my problem.

Jesse
07-04-2001, 01:14 AM
http://www.actionscripts.org/forums/showthread.php3?threadid=3648