| 
            
              | by B Williams [brennonwilliams at yahoo dot co dot uk] posted on 2004/11/05
 |  |  Hello,After spending the better part of a few days trying to get my connections working I finally reached a point that the connection stayed open, allowed me to send to the server and then allowed me to get some more data back. Great!
 
 Just when I thought it was all going so well, when I try to then either send more data or get any new data sent from the server, my connection hangs???
 
 The process of communication for this particular server is:
 
 Client connect
 Client Send Version Tag
 Server Send Version Tag
 Client Get Version Tag
 
 **** This all works fine ***
 Then
 Server Send "User : "
 Client Get data from stream..
 
 This is the point that it fails... I can never get the "User : " tag sent from the server ??? It just hangs, no timeouts no nothing, even the connection is still open.
 
 Here is what I am using to read/write to the stream
 
 '************ WRITE SUB
 
 Private Sub cmd_Send_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmd_Send.Click
 
 Try
 
 'Get a client stream for reading and writing.
 MyMasterWriter.WriteLine(txt_sendtext.Text)
 MyMasterWriter.Flush()
 
 AddStat("Send Complete")
 
 Catch ex As Exception
 MsgBox("Error Sending Data. " & ex.Message)
 End Try
 End Sub
 
 '************ READ SUB
 
 Private Sub cmd_read_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmd_read.Click
 
 Try
 Dim responseData As String
 'Read the data from the stream
 If MyMasterReader.Peek > 0 Then
 responseData = MyMasterReader.ReadLine
 End If
 'Print the string in the box
 txt_recbox.Text = txt_recbox.Text & responseData & vbCrLf
 
 'Show a read symbol
 txt_recbox.Text = txt_recbox.Text & "------" & vbCrLf
 
 Catch ex As Exception
 MsgBox("Error Receiving Data. " & ex.Message)
 End Try
 End Sub
 
 
 
 I am using what is said to be the current version....
 
 PLEASE HELP.... hair going gray....
 
 
 |