Tcp client library RRS feed

  • Question

  • Is there any useful tcp client library?

    It is best to be able to detect if the server connection is disconnected or to send a heartbeat packet at regular intervals.

    Is there any easy to use library? Use on top of the framework

    please verify my account

    Wednesday, August 8, 2018 5:30 AM


  • You mean beyond the already provided Socket and TcpClient classes? Why would you need one? 

    The only way to truly know that a connection has been dropped is to use it. As for a heartbeat there is no formal specification for how it works so each server implements it differently. Your client call would simply be a "ping" request to the server using whatever format it requires. Wrapping this in a simple method (or perhaps extension method on TcpClient) would be sufficient. 

    Of course if you just want to "ping" a server (not a TCP server) then there is the Ping class.

    Michael Taylor

    Wednesday, August 8, 2018 2:04 PM