I’m evaluating different options for communication between C# applications. My requirements are:

  • Central server where clients connect
  • Persistent connection, server should know when clients connect/disconnect.
  • Server can broadcast messages to all clients
  • Server can send messages to individual clients
  • Clients can send message to server
  • Message size up to 10-20 mb in some scenarios
  • Secure communication

I’m currently evaluating SignalR which seems to fit all my needs the only concern I have is around message reliability and message size.

Also been thinking about raw TCP or maybe gRPC.

How should I approach this problem? I’m I missing something or are there any other libraries that I should look at?

I’m looking for someone with experience in this exact field, I understand that I could evaluate all the options myself but I’m also thinking that I might be missing something that I did not think about.

Is there someone who has created a similar implementation that can share some experience?

Can someone give me examples of libaries to use in C# and share some experiance?

  • 1
    Your edit does not do anything to make this on-topic - in fact, in makes it even more off-topic. Commented Feb 16 at 8:18
  • 1
    Your requirements seem fairly common, and there should be quite a few protocols that should fit. Most will guarantee reliable transport. If you are concerned about size you can always do some kind of "chunking" on the application layer. I would advice against raw TCP since creating your own protocol will likely be difficult to get right. You could also take a look MQTT or RabbitMQ for a slightly different approach.
    – JonasH
    Commented Feb 16 at 12:01
  • @JonasH thanks for the answer! If going down the message-path - would that mean pushing “heartbeats” from each service to know if/when someone goes offline? Do you and any particular protocols in mind for persistent connections? Commented Feb 17 at 13:02
  • I found MQTT to be fairly easy to get started with, I think that automatically sends keep-alive messages to keep connections alive. But I have not done any comprehensive comparison between protocols.
    – JonasH
    Commented Feb 19 at 7:54
  • Thanks @JonasH I kind of a newbie in the networking world of C# so the pointer towards MQTT was very valuable - just been playing with it for a couple of hours and it feels really good =D Thanks a lot! Commented Feb 19 at 22:56


Browse other questions tagged or ask your own question.