I am building an application in which sends an outside server data, it then shoots back data which pertains to what I sent. The problem that I am having is that the maximum amount of bytes tha will come back is 8001. The program works fine as long as the return byte value is less then 8001. Something with the max value sounds familiar but I can not pin point it. What else could I do to receive the rest of the data?

This code snippet is where im getting problem

Dim bytesSent As Integer = sender1.Send(data)
 Dim bytes(64000) As Byte
Dim bytesRec As Int64
 
'**** Where the problem happens
bytesRec = sender1.Receive(bytes)
'****
Dim response As String = Encoding.ASCII.GetString(bytes, 0, bytesRec)

Console.WriteLine("Response: " + response)

 writetofileCLUE(response)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.