So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By mrlightsman
#76014 I've been working on this a bit over the weekend and am now giving serious thought to using websockets rather than udp to survey the status of my switches. The question is, "Can a sketch run two instances of websockets client at one time?"

My current switch sketch already uses
Code: Select allwebSocket.begin("somewhere.com", 80, "/");

and
Code: Select allwebSocket.onEvent(webSocketEvent)
;

Can it simultaneously use
Code: Select allwebSocket.begin("192.168.0.123", 81, "/");


Then handle both websockets events in my void(webSocketEvent)?