Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everyone,

Question is bit out of mind but still would like to know more about it.

I have a scenario where i want to send notification to all clients when Server is shutting now.
and when i again server starts, i want to send notification to all clients that were online before shutting down.


I don't know if its possible easily or there is some workaround....


Thanks,
Posted
Comments
[no name] 16-Aug-13 11:06am    
Did you look at signalR ?
deepakdynamite 16-Aug-13 22:57pm    
Thanks for your comment... Can this be done with WCF as well ?

1 solution

This is possible. You may have heard about server-push. It is a way in which a server pushes resources to the clients without the request of clients. In your scenario, you can do it easily by registering the IP of the client whenever a client is connecting with the server; when the server is shutting down, just send a notification to the client about the shut down; and when the server is back, you need to make sure the client is still alive or not (I don't know how you can make sure about it) and if the client is alive you can send it the notification again that the server is alive. You will have to de-register the IP of the client in case client has gone offline while server was alive and not shut down. And for that you need to look for some best possible way otherwise you will keep sending notifications to, may be, some wrong IPs.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900