views:

45

answers:

3

Hi,

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!!

A: 

yes use the (network)stream to write data to the webserver

Digital Human
A: 

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 :).

Alex Ciminian
A: 

You'll need the experimental HTML 5 Websockets see slides for the idea, or other server push stuff

Redlab