I have an appliction which is receiving inbound xml which it processes and writes to a database.
I am having a problem when receiving a large stream. In winsock api I would wait until the whole message was received and parse the streams together to form the file. When I try that here, I do not get the whole file.
Here is an example of the code.
VB Code:
Do Dim InBuff(200000) As Byte Client.GetStream().Read(InBuff, 0, InBuff.Length) txtLog.Text = txtLog.Text & vbCrLf & "[" & Now & "] >Processing incoming request." Application.DoEvents() temp = temp & System.Text.Encoding.Default.GetString(InBuff) temp = Trim(temp) Loop Until Client.GetStream.DataAvailable = False
Sometimes I get the whole file on the first run. Could I get some he
