Reputation: 2419
I have a TCP server, which is connected to a web page via a Web browser. It is easy to send a request to the TCP server by the web page via the Web Browser, but is there a way that TCP server can push data to the web browser, without waiting for a request from browser side?? My initial idea was that this is impossible, since a browser is stateless. But I was told there are ways to do that... Any ideas?
Thank You!!
Upvotes: 2
Views: 817
Reputation: 11508
From what I know, WebHooks and Comet are the only ways to push data from the server to the client, while still using HTTP. See if they're what you're looking for :).
Try websockets (with socket.io, if that's available). Also, check out meteor for inspiration.
Upvotes: 1
Reputation: 3118
You'll need the experimental HTML 5 Websockets see slides for the idea, or other server push stuff
Upvotes: 2