简体   繁体   中英

can we use Server Sent Event (HTML5) with WCF

How can i use server sent events with WCF?

To be specific:

  1. how to make wcf broadcast and send data continuously to client.
  2. How to consume those information in HTML5 page.

No you cannot.

What you are asking for is not possible.

You can send data to WCF clients via callbacks over duplex bindings, but this is not receivable from javascript, only WCF clients.

Or you can send data to client side javascript code using SignalR, which is an implementation of server sent events.

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