JS函数通过网络发送数据? [英] JS Function to send data over network?
本文介绍了JS函数通过网络发送数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近一直在尝试JavaScript,并且想知道是否有一种方法可以将数据从一台计算机发送到同一网络中的另一台计算机.如果有,我使用它吗?
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?
推荐答案
您可以通过一个简单的Windows到Windows通讯示例进行介绍.通过以下链接.
You can go by a simple example of windows to windows communication. Go through the following link.
将服务器复制粘贴到server.js,将客户端复制粘贴到index.html.
copy and paste server to server.js and client to index.html.
设置:
install socket.io
install client.io
链接:
<https://www.tutorialspoint.com/socket.io/socket.io_broadcasting.htm>
这篇关于JS函数通过网络发送数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文