Bubba

Bubba


  • Name: [not set]
  • Favorite Languages: [not set]
  • Website: [not set]
  • Location: [not set]
  • About Me: [not set]

Recent Comments

  • C# Tutorial - Simple Threaded TCP Server
    05/07/2010 - 14:23

    This is a really great example and I have a working implementation. Thanks. One thing I can't seem to wrap my head around though.

    In the scenario you have covered, a client sends a message to the server and the server responds. How do you set up for a scenario where the server can also send a notification to the client. The client would always have to be in a listening state (ie: bytesRead = clientStream.Read(message, 0, 4096); ) which would cause issues when the client sends a command and is waiting for a response from the server.

    Would I need two connections to handle this or is there a more elegant way to accomplish this ?