Socket connection demo for Cordova