Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Server-Client Application Advise

i want to write a server-client application with C#. Server app must send a message or object to client and after this message must trigger some functions in client app. What class or tech should i use? System.Net TcpClient class or .NET Remoting or other technology? Where should i begin? I am beginner at network programming. Any advise will be helpful. Thanks for reading this question and your answers.

like image 896
bselvan Avatar asked Mar 10 '26 02:03

bselvan


2 Answers

If you are specifically dealing with a publish/subscribe scenario, I would advise using ZeromMQ (clrzmq + libzmq). ZeroMQ is extremely easy to use and very fast. You'll find plenty of C# examples, corresponding to various scenarios on the ZeroMQ site. Depending on your specific needs, you can combine ZeroMQ and OpenPGM to do pgm (tcp) or epgm (udp) multicasting.

like image 132
David Brabant Avatar answered Mar 12 '26 16:03

David Brabant


Simply use UdpClient class. Later you can move to TCP, if you need more reliability. UDP is simplest way to send messages across network.

like image 25
Viktor Avatar answered Mar 12 '26 15:03

Viktor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!