I have been experimenting with JavaScript lately and was wondering if there was a way to send data from one computer to another on the same network. If there is, you do I use it?
Asked
Active
Viewed 1,412 times
-2
-
I believe WebRTC supports peer-to-peer applications. http://www.webrtc.org – Ben Aston May 31 '15 at 20:14
-
You will have to setup a server which can be done in node.js from there you can have your clients communicate over http. – t3dodson May 31 '15 at 20:14
2 Answers
0
Sure there is, but you need a server for that. You cannot connect directly two computers' browsers over a network:
Computer A ---+
|
SERVER
|
Computer B ---+
The server's task will then be that of passing messages from one client to the other. You'll need PHP or C# (e.G. ASP.NET) for that. This topic is very (very) broad so this must suffice as an answer.

pid
- 11,472
- 6
- 34
- 63
0
You can go by a simple example of windows to windows communication. Go through the following link.
copy and paste server to server.js and client to index.html.
setup:
install socket.io
install client.io
link:
<https://www.tutorialspoint.com/socket.io/socket.io_broadcasting.htm>

Ank_247shbm
- 512
- 7
- 17