How to use tcp protocol in ionic


#1

I tried to use this code TCP sockets in ionic in my ionic 2 app but it says can not read property sockets of undefined.
Anyone can help me to solve this problem and to understand how to use chrome.tcp.socket plugin?


#2

I am using https://github.com/blocshop/sockets-for-cordova and it works fine (only works on devices)