Post 6 made on Saturday July 3, 2010 at 13:25 |
multimedia Long Time Member |
Joined: Posts: | December 2006 111 |
|
|
Yes, of course I'll put the code, however it's quite basic:
Activity script:
var synSocket; var asynSocket;
asynSocket = new TCPSocket(false);
asynSocket.onConnect = function() { System.print("connected"); }
asynSocket.onClose = function() { System.print("disconnected") }
asynSocket.onIOError = function(e) { System.print("Error "+e); }
if (asynSocket.connected == false) { //putting 'xml.weather.com' instead of the IP will block the syn socket connection in the page script, if there is no internet access asynSocket.connect('65.207.183.129', 80, 3000); }
Page Script:
synSocket = new TCPSocket(true); synSocket.connect('192.168.0.100', 12000, 500); socket.write(String.fromCharCode(0xF0, 0xF1, 0xF2)); var data = socket.read(1000,500); synSocket.close();
Thanks again Lyndel, you really saved me a lot of time !
|
|
|
|