Search code examples
c#wcfnetwork-programming

Two way client server network communication


I am looking at building a client server application in C# using winforms or WPF. The client application must be a local application because it has to interact with specialised hardware.

The architecture I'm looking for is the client connects to a server port using TCP/IP. The client will then make requests to the server and the server will send responses to the client. The client wills stay connected to the server while the user is logged in.

I have looked at web services and as far as I can figure out, WCF extends web services which means there is no way for the server to send a message to the client.

Am I incorrect about WCF? If not what is the best way to accomplish this?


Solution

  • WCF supports duplex messaging which should accomplish what you need.

    See also: http://msdn.microsoft.com/en-us/library/cc645027(VS.95).aspx