First off, this code works fine in debug mode, but not in run mode. This loop is only getting some of the data. After NetworkStream.Read is called, there is no more data in the buffer and DataAvailable turns to False, but the server still has data to send to me, it just hasnt sent it to me yet.
i used:
While stream.DataAvailable
size = stream.Read(current, 0, current.Length)
Debug.Write(size & vbCrLf)
ReDim Preserve current(size - 1)
ReDim Preserve all(all.Length + size - 1)
Array.Copy(current, 0, all, all.Length - size, current.Length)
ReDim current(8191)
End While
any help would be appreciated, thanx
i used:
While stream.DataAvailable
size = stream.Read(current, 0, current.Length)
Debug.Write(size & vbCrLf)
ReDim Preserve current(size - 1)
ReDim Preserve all(all.Length + size - 1)
Array.Copy(current, 0, all, all.Length - size, current.Length)
ReDim current(8191)
End While
any help would be appreciated, thanx