Hello, In my application I need to use a custom protocol over raw TCP sockets (so socket.io is out of scope). I need to connect the mobile device to another with a certain IP address, and send and receive data over this connection. As far as I have seen, the closes plugin that could support this for ionic 2 would be cordova-plugin-chrome-apps-sockets-tcp, but I have not had any luck in using this in an ionic 2 project.

I have tried bothdeclare var chrome;
and(<any>window).plugins.chrome.tcp.socket.create();
without any success.

For anyone interested: the reference to the plugin is made via window, but not through the plugins namespace, but directly. Thus, in order to call, for instance, the create method, one should use:(<any>window).chrome.tcp.socket.create();