-2

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?

2 Answers2

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