Say I want to write a peer to peer chat application. And I use a WCF service as the server that the clients 'log in' to so that they can find each other's ip addresses and ports.
Well, say also I have a textbox in my client application that display all users that are online. Everytime users log in or out I want to update this 'Who's online' textbox so that only the currently online users are shown.
So the server needs to send information out to all clients once a user logs in or out. But it seems WCF can only send data when responding to requests....
Am I missing something here, is WCF able to handle this situation?
我认为你需要双工服务。
There are several approaches to this problem, these would probably be the most common:
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.