notify client from server

后端 未结 1 521
春和景丽
春和景丽 2020-12-21 06:27

If I have an asp.net application, and I want to notify the user when something changes on the server, how do I do this. The same thing with a silverlight client. For the sil

相关标签:
1条回答
  • 2020-12-21 06:41

    There are 2 ways. The first one is to check your server every few minutes, but I believe that you do not search for this obvious way, you search for another technique that called comet.

    Comet technique creates and opens connection to your server from the client, and when the server closes the connection, it means that there is a new message for your client, your client reads the messages, and opens a new connection waiting for the next message. The other way is to just open a connection and stream the data, when they are available from the server to the client, and not to close the connection at all. The only thing that you need to take care of is to increase the number of open connections that allowed to your site.

    Check this sites for comet with asp.net

    http://www.frozenmountain.com/websync/

    or

    http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/

    0 讨论(0)
提交回复
热议问题