Click to See Complete Forum and Search --> : Problems with getting more than 64Kbytes.
OferTs
Jun 18th, 2006, 04:26 PM
Hi,
I have written an UDP client using winsock control in vb6.
When i load from server quantity of bytes till 64k the operation is succesful.
When the file size in bytes is more than 64k the win socket stops getting data. I think that the winsock buffer is full and need to be cleared. Am i right? and if it so how can i clear it? if it isn't the reason what it can be? I am really struggling to findout what makes this behaviour.
can anyone please help me...
Thanking you in advance.
Best regards
Ofer
ccoder
Jun 19th, 2006, 08:34 AM
Check out this (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbcondatalimitations.asp) article.
dilettante
Jun 30th, 2006, 01:13 PM
Winsock Programmer's FAQ: The Lame List (http://tangentsoft.net/wskfaq/articles/lame-list.html)
27. Assuming that a UDP datagram of any length may be sent. Criminally lame.
Reason: Various networks all have their limitations on maximum transmission unit (MTU). As a result, fragmentation will occur, and this increases the likelihood of a corrupted datagram (more pieces to lose or corrupt). Also, the TCP/IP service providers at the receiving end may not be capable of re-assembling a large, fragmented datagram.
Alternative: Check for the maximum datagram size with the SO_MAX_MSG_SIZE socket option, and don't send anything larger. Better yet, be even more conservative. A max of 8K is a good rule-of-thumb.
Network support for the Lua language (http://www.cs.princeton.edu/~diego/professional/luasocket/udp.html)
The maximum datagram size for UDP is 64K minus IP layer overhead. However datagrams larger than the link layer packet size will be fragmented, which may deteriorate performance and/or reliability.
To misquote Obi Wan Kenobi, UDP "isn't the protocol you're looking for."
OferTs
Jul 2nd, 2006, 02:31 PM
Thank you.
I makes a project for a large company with branches abroad.
I solved this problem. The server which my program conects has a range of
addresses, and my software sent it incorrect addresses because of a bug in addresses increamenting routine, so it stopped after address 64k.
Now i have a new problem.
Assuming my application has no bugs, can you tell me why do i get error message from server: "Remote host reset connection", and what can i do to renew the connection, except for restarting my computer.
I appreciates your help.
Ofer.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.