Working ionic UDP example using chrome.sockets


I found some posts about it but nothing worked out of the box for me. Could someone provide me a working example?

Here I used this code from here, even though it is tcp it is almost the same:

But I do get the error:

Unable to get property ‘tcp’ of undefined or null refer

Could someone tell me what I do wrong?



Could someone provide me any UDP example? It does not have to use the chrome socket library. I’m thankful for any example.