Javascript与服务器的TCP连接

编程入门 行业动态 更新时间:2024-10-18 20:24:23
本文介绍了Javascript与服务器的TCP连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我创建了服务器守护程序,它会生成一些数据,比如消息等等。但是,我感兴趣的是 - 客户端监控。例如,我有网页,我需要建立与服务器的持久Tcp连接,并将所有传入的数据显示到文本框中。我知道它可以用flash完成,但我正在搜索JS实现。

I have created server daemon, that produces some data, like messages and so. But, what im interested in - client monitoring. For example i have web page, and i need to establish persistent Tcp connection to server and show all incoming data into textbox. I know it can be done with flash, but im searching for JS implementation.

是否有可能以及最佳做法是什么?

Is it possible and what`s the best practices ?

推荐答案

您所要求的是 Comet 。存在大量服务器软件和客户端库 - 请参阅链接的维基百科页面。

What you're asking for is known as Comet. Plenty of server software and client libraries exist - see the linked Wikipedia page.

更多推荐

Javascript与服务器的TCP连接

本文发布于:2023-11-15 21:32:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1598132.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:服务器   Javascript   TCP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!