简体   繁体   中英

Javascript TCP connection to server

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 ?

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

WebSockets旨在解决此问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM