Correcting socket connection to use SSL

Correcting API URL and connection method for people not using CURL library.