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:
''' <summary> ''' Sends text on the stream to the server. ''' </summary> Public Sub sendText(ByVal message As String) If stream Is Nothing Then If connection IsNot Nothing Then If connection.Connected Then sendData(System.Text.Encoding.ASCII.GetBytes(message), connection.GetStream) End If End If Else sendData(System.Text.Encoding.ASCII.GetBytes(message), stream) End If End Sub




Reply With Quote