Things are working better, but for some reason I think the stream may be getting damaged. I can send data to the server and it receives it but I am not getting any data back on the stream after I run a few commands. It goes to the sendData inside the else statement, but the client (on the same computer) does not receive the chat messages. Other things seem to arrive ok. We have been having weird problems like this for a while. It seems like if we comment certain things out that it works, but we have not figured out why. Right now I do not see any reason it should not be working at this point.

What tests do you recommend on the stream?
vb Code:
  1. ''' <summary>
  2.     ''' Sends text on the stream to the server.
  3.     ''' </summary>
  4.     Public Sub sendText(ByVal message As String)
  5.  
  6.         If stream Is Nothing Then
  7.             If connection IsNot Nothing Then
  8.                 If connection.Connected Then
  9.                     sendData(System.Text.Encoding.ASCII.GetBytes(message), connection.GetStream)
  10.                 End If
  11.             End If
  12.         Else
  13.             sendData(System.Text.Encoding.ASCII.GetBytes(message), stream)
  14.         End If
  15.     End Sub