I am currently developing a C# Windows Form Application that I intend to let it interact with a server. The server will receive posting from a mobile application that I have developed and whenever a posting is received, my Windows Form Application should be notified and give me a notification.
Eg My mobile application sends an message over to my server. Once my server receives the message, my windows form application should display a new notification showing the content of the message received.
The above scenario is just a example of what I intend to do with the whole thing. Any idea how should I code my C# application in order to receive the information as stated above?
You can implement a WCF Service inside your server. You Windows Form application can be your WCF Service client.
What you probably want is a Duplex Service
They way this would work is
As an alternative to the answer @parapura rajkumar, you could also investigate a Message Queue architecture , where the messages posted back from the mobile app are visible to both the server and the Windows client.
Perhaps a little more heavy-weight but certainly worth consideration, especially if you suspect the application may need to grow in complexity in the future...
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.