| | |
Maximum Return Bytes of SOCKETS
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Feb 2008
Posts: 13
Reputation:
Solved Threads: 0
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
This code snippet is where im getting problem
VB.NET Syntax (Toggle Plain Text)
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)
See ASP Net - Strange problem with System.Net.Sockets.TcpClient(). There's the same problem solved.
The point is to read data in a small blocks in a loop to a buffer, and to check how many bytes you've received in each loop.
After all the data is read, convert byte buffer to a string.
The point is to read data in a small blocks in a loop to a buffer, and to check how many bytes you've received in each loop.
After all the data is read, convert byte buffer to a string.
Teme64 @ Windows Developer Blog
![]() |
Similar Threads
- Audio trouble (PCI and Add-In Cards)
- memory management in wndows 2000 (Windows NT / 2000 / XP)
Other Threads in the VB.NET Forum
- Previous Thread: Custom User Control
- Next Thread: excel vb.net
Views: 383 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net .net2005 30minutes 2005 2008 access account application arithmetic array arrays basic binary bing button buttons c# center check code combobox component connectionstring convert crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dll dropdownlist excel file-dialog folder ftp google hardcopy highlighting image images inline insert listview login mobile ms net networking output passingparameters peertopeervideostreaming picturebox picturebox1 plugin port print printing problem problemwithinstallation project reports" save savedialog searchbox serial server soap sorting sql string syntax table tcp text textbox timer toolbox trim update updown usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf





