WebRTC on local network?

General Tech Bugs & Fixes 3 years ago

737 2 0 0 0

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago

I've been reading about WebRTC and it looks very promising. I wanted to make a simple lan game that automatically connects people on the same network. Though I could find people asking about something similar, and answers telling them it was possible, I couldn't find any clear tutorials on how it can be done.

I am however very new to WebRTC and web programming in general. So maybe I just don't know what to search for.

So, how can I automatically connect people using WebRTC on a local network without anyone having to run a separate server or connect to the internet? They should be able to open a html file on their computer and connect to everyone else doing that on the same network, even when there's no internet.

Thanks!

1 views
0 shares

profilepic.png
manpreet 3 years ago

At least one machine needs to be a server, in the sense that it needs to have a port open that it listens on. This is a fact of life with all connections; when one machine opens a connection, there needs to be another machine on the other end that responds. Without this, no connections can ever be made.

If you are willing to have one or all machines listening on a port, then you can setup WebRTC on a LAN. In this case, you will not need STUN or TURN because there is no NAT traversal.


1 views   0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum