最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

sockets - Javascript TCP connection to server - Stack Overflow

programmeradmin1浏览0评论

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 ining 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 ?

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 ining 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 ?

Share Improve this question asked Jun 13, 2009 at 22:56 Dan SosedoffDan Sosedoff 2,8695 gold badges28 silver badges35 bronze badges 1
  • 3 You are not going to get tcp/sockets with JavaScript. You are stuck with http. – epascarello Commented Jun 13, 2009 at 23:07
Add a ment  | 

2 Answers 2

Reset to default 5

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

WebSockets is designed to solve this problem.

发布评论

评论列表(0)

  1. 暂无评论