简体   繁体   中英

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.

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);

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