Post 6 made on Monday March 23, 2009 at 15:40 |
macdonm2 Long Time Member |
Joined: Posts: | January 2008 12 |
|
|
Hello Barry,
Looks like your suggestion was a good one despite the Pronto manual saying that 'read' would work as it was in scope. I can now send commands to the Kivor server which are acted upon but I cannot read the response. The code I am using is as below - I don't get any errors but when I run the script 'LINE1' is showing
receiving + functionread(){ [native code] }
Any ideas
var socket = new TCPSocket(false); var result = ""; socket.onConnect = function() { socket.write("#pronto#@Z01@1$PLAY$~\r\n"); };
socket.onData = function() { var received=socket.read; result += received; CF.widget("LINE1").label="receiving"+ received; };
socket.connect('192.168.1.100', 6789, 3000);
|
|
macdonm2 |
|