locked
Recommended way of encrypted low latency communication between 2 .NET WinForm application on different PCs RRS feed

  • Question

  • I have 2 applications C# WinForms applications. Application A is started on a computer where I directly can listen on internet facing TCP/UDP ports. Application B is started behind a unmanaged firewall. I already have a secure way of making a handshake communicaton to exchange e.g. encryption keys, IP & port but it turns out not to be stable enough to use it for long. Applicaton A is program that is started by a user, not a service.

    What kind of communication library/method is recommended? I've used the WatsonTcp library before, but I can imagine there are more common/standard/recommended solutions. Important is low latency and stability (would be if nice it survives a Wifi hiccup). What would be a recommended solution for communication between the 2 C# apps? Any tips?

    Wednesday, October 21, 2020 2:53 PM

Answers

  • Hi CleverlT,

    Thank you for posting here.

    Maybe you can take a look at these libraries.

    NetCoreServer

    netmq

    But I have no experience using these libraries, so I am not sure whether their performance is good or not.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by CleverIT Friday, October 23, 2020 10:00 AM
    Thursday, October 22, 2020 8:10 AM
  • Why not use WCF with one of the secure transport bindings? It already allows communication across networks and the security is already implemented and tested. The overhead is likely to be minimal for you but only you can decide what that is. Furthermore it allows strongly typed communication so all you really need to do is define the WCF server endpoint and anybody can be the client.

    Alternatively I'd lean toward using REST with HTTPS. Again, already implemented and secure. It is also fast on the level of milliseconds. All you need is a web server on one end and the client can use any HTTP library it wants

    The hardest part about either of these, if you can call it that, is ensuring the server app is running. Most of the time these types of services are simply hosted in IIS which already has all the advanced features you need like keepalive, caching, DNS resolution, etc. No real reason to build your own protocol library unless you need to talk to a custom endpoint. As for wifi hiccups most HTTP clients can be hooked up to a library like Polly for implementing retry if there is a blip on the network.

    Ultimately I'd lean toward using what is already available, secure and tested over anything custom. 


    Michael Taylor http://www.michaeltaylorp3.net

    • Marked as answer by CleverIT Friday, October 23, 2020 10:00 AM
    Thursday, October 22, 2020 1:34 PM

All replies

  • Hi CleverlT,

    Thank you for posting here.

    Maybe you can take a look at these libraries.

    NetCoreServer

    netmq

    But I have no experience using these libraries, so I am not sure whether their performance is good or not.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by CleverIT Friday, October 23, 2020 10:00 AM
    Thursday, October 22, 2020 8:10 AM
  • Why not use WCF with one of the secure transport bindings? It already allows communication across networks and the security is already implemented and tested. The overhead is likely to be minimal for you but only you can decide what that is. Furthermore it allows strongly typed communication so all you really need to do is define the WCF server endpoint and anybody can be the client.

    Alternatively I'd lean toward using REST with HTTPS. Again, already implemented and secure. It is also fast on the level of milliseconds. All you need is a web server on one end and the client can use any HTTP library it wants

    The hardest part about either of these, if you can call it that, is ensuring the server app is running. Most of the time these types of services are simply hosted in IIS which already has all the advanced features you need like keepalive, caching, DNS resolution, etc. No real reason to build your own protocol library unless you need to talk to a custom endpoint. As for wifi hiccups most HTTP clients can be hooked up to a library like Polly for implementing retry if there is a blip on the network.

    Ultimately I'd lean toward using what is already available, secure and tested over anything custom. 


    Michael Taylor http://www.michaeltaylorp3.net

    • Marked as answer by CleverIT Friday, October 23, 2020 10:00 AM
    Thursday, October 22, 2020 1:34 PM