Say when i click on "A" button, my program will receive the large XML data for "A" from the server...
1) However, i will only receive one section of data....
2) Then when i continue to click on "B" button, it will not receive "B" data
instead it will continue to receive the rest of "A" data...
My coding for receiving the data....
How to solve the problem of getting large data...Code:Dim tcpC As New TcpClient Public Function receive() As String Dim ascii As Encoding = Encoding.ASCII Dim networkStream As NetworkStream Try networkStream = tcpC.GetStream() Dim bytes(tcpC.ReceiveBufferSize) As Byte networkStream.Read(bytes, 0, CInt(tcpC.ReceiveBufferSize)) Dim ret As String = ascii.GetString(bytes) Return ret Catch End Try End Function
Thanks




Reply With Quote