Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 2 made on Monday November 29, 2010 at 11:42
BluPhenix
Long Time Member
Joined:
Posts:
December 2008
371
To send something 3 times you just loop it:

for (i=0; i<3; i++) {
do whatever you want
}

So:
socket.onConnect = function()
{
var i;
for(i = 0 ;i < 3; i++) {
socket.write("GET /web/remotecontrol?command=2 HTTP/1.0\r\n\r\n")
// System.delay(100); // maybe not needed
}
socket.close();
};

Try sending everything you mean before you close the connection because the HW may work in a way that when it sees the closing of the socket, it thinks the data it recieved is final.


Hosting Services by ipHouse