TCP sockets in ionic

you need to use the platform.ready() function to make sure cordova is ready, THEN the chrome sockets will be usable…

import {  Platform } from 'ionic-angular';

inject via constructor

constructor(public navCtrl: NavController, public navParams: NavParams,
  			public viewCtrl: ViewController, **platform:Platform**)

in constructor

     platform.ready().then(
	(readySource) => {
	     if(readySource=='cordova'){
	     	 // start handling network stuff now
	     }
      });