0

I want to send some UDP packets from my angular 2 app. While searching for a solution I found some npm packages that look like they could do the job.

I thought I could just install and use this packages in angular but it did not work. Some research reavled some howtos but they look very diferent so that I am totally confused.

Can I use every npm package with angular? If yes, how?

1 Answer 1

1

No, not every package; there are limits. Browserify implements replacements for many of Node's built-in APIs, but not everything is possible in the browser.

This is discussed in the compatibility section of the documentation.

If a package relies upon an built-in API that is not browser-compatible - or relies upon native code - it won't work. And, as far as I am aware, sending UDP packets is not going to be possible.

Sign up to request clarification or add additional context in comments.

2 Comments

thanks, I read that UDP would not be possible but I thought that there might be a way with this packages. Do you know if it is possible to send TCP packets?
I very much doubt it. XHR, WebSockets and WebRTC are the only options of which I am aware, but I'm no expert in browser-based networking stuff.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.