[英]2 way communication using HTML and Javascript?
I've been looking for a while for a simple solution to what seems like a relatively simple problem, but I just cannot for the life of me manage to find it. 我一直在寻找一个看似相对简单的问题的简单解决方案,但是我一生都无法找到它。
So here is what I am trying to do: 所以这是我要做的事情:
So my question is this: How can I get the client to send a value, over TCP/IP, to the server, changing the value of that variable? 所以我的问题是:如何让客户端通过TCP / IP向服务器发送一个值,以更改该变量的值?
I can see that there are rather complex ways to do this, using websockets, sockJS, and other complex solutions, but if anyone knows of a super simple way to do this, please let me know. 我可以看到使用websockets,sockJS和其他复杂的解决方案有很多复杂的方法,但是如果有人知道执行此操作的超级简单方法,请告诉我。
Thanks :) 谢谢 :)
You'll want to use sockets. 您将要使用套接字。 I'd recommend socket.io http://socket.io/
我建议使用socket.io http://socket.io/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.