https://snapyourdreams.com/wifi-smart-socket-function/
Wifi Smart Socket Function