On August 5, 2020 at 18:33, mpg7321 said...
OK, I think I may have an understanding. So the question is where would I put this, for I am amusing I can not open and close two sockets and write to two sockets all in the same function.
You can have up to 16 sockets open concurrently. Within the same function is also possible "if" you name the variable differently.
var socket1 = new TCPSocket();
var socket2 = new TCPSocket();
socket1.onData = function() {
}
socket2.onData = function() {
}
I had previously referenced the Dev Guide and a O'Reilly Javascript 5th Edition book by David Flanagan (specifically the first 10 chapters). Have you had an opportunity to review the last 1?