Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Focak
#46538 Yes this helped :

I change this line : var wsUri = "ws://dns-host:81/";

with this line: var wsUri = "ws://" + location.host + ":81/";

and now I can connect to websocket server with local ip address from local network ,
also through public ip/ dns-host when I am on public network.

Thanks a lot for help