C#-APP: TCP multi-client continous connection/data exchange

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dantz
    New Member
    • Oct 2008
    • 71

    C#-APP: TCP multi-client continous connection/data exchange

    Hi,

    I am wondering how should I implement my multi client-server application.

    When the connection of a client is established with the server and the exchange was done, can I just retain the connection until the client initiates to disconnect?

    Or just disconnect whenever a request/response was finished then establish a new connection again if it is needed

    I am just concerned that if the connection will be continous it may be not a good choice because of network issues (bandwidth,secu rity or anything) or client machine issues (memory,local resource or anything)

    I hope anyone can help me on this.



    TIA- Dan
    Last edited by dantz; Nov 18 '08, 06:01 AM. Reason: changed to a better title
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    I think it more depends on your requirements.
    There is a bit of processing overhead to connect and disconnect sockets. BUT if more time is spent being idle(not transfering data) then not being idle, it might be better to disconnect.
    But, you would also want to consider, do you need to validate a user? Like username/password/account info/etc? If so you would probably need to do that for EVERY connection, that could be a lot of extra data.

    Just things to consider

    Comment

    • dantz
      New Member
      • Oct 2008
      • 71

      #3
      Thank you very much.
      I think that clarifies a lot.

      It was very helpful. :)

      Comment

      Working...