Is there a way in JavaScript to command the browser to listen to a specific location? i.e. a stream of data
Javascript: listen to server
Collapse
X
-
-
I am writing a live-chat, clients will send data to server and the server will send the data to all clients currently connected.
I need the client to listen for that data.Comment
-
then the easiest way would be to poll a service with an interval like:
this calls the commented code every 30s ...Code:var interval = window.setInterval(function() { // service call logic here, could even be a function-cll with the logic }, 30000);
kind regardsComment
Comment