sam
sam

Reputation: 157

Calling HTML function from WCF service

I have a callback in WCF service, which receives the raw frames from the camera. Now I am writing a HTML application that displays these frames.

But, as of now, I use a button click event in HTML to get the current frame from WCF service(using ajax). I would like to get the frames continuously with a single button click event. Any ideas on how to do so?

Thanks in advance.

Upvotes: 0

Views: 67

Answers (1)

Mike Gledhill
Mike Gledhill

Reputation: 29201

No, you would need your JavaScript to repeatedly call your web service.

You can't just get a WCF service to return some results, then every few seconds later, return some (updated) results.

//  Call a web service, once every 3 seconds.
setInterval(function() { 
    //  Call your WCF service here
}, 3000);

Upvotes: 1

Related Questions