Packet Size Problem...
The server is sending packets of 4032 bytes and the Client is recieving packets of 4380 bytes. How on earth is the client recieving more data then is sent? Any ideas would be apriciated greatly
mike.
The "extra" bytes are the header used by TCP/IP or UDP or
whatever protocol you''re using.
Kami no Itte ga ore ni zettai naru!
whatever protocol you''re using.
Kami no Itte ga ore ni zettai naru!
I was thinking about that Tangentz but...
4380 - 4032 = 348 bytes !
Isn''t it a bit too much for a header ? Well I guess the 400kb are not sent in one big buffer but in several times; it could explain that.
4380 - 4032 = 348 bytes !
Isn''t it a bit too much for a header ? Well I guess the 400kb are not sent in one big buffer but in several times; it could explain that.
I don''t believe that''s the problem. Most of the time the client recieves the proper number of bytes 4036. It seems that it only randomely recieve the 4830 bytes. I can''t figure this out. (TCP/IP)
mike.
mike.
Anyway is it really an issue ?
What kind of sockets are u using ? (non)blocking/async ?
Why not writing the buffer in a file or somewhere else so that you can check what''s going on in it ?
What kind of sockets are u using ? (non)blocking/async ?
Why not writing the buffer in a file or somewhere else so that you can check what''s going on in it ?
is it an issue? i would say so, i always like my code to work as it''s suposed to. i managed to fix the problem. the problem was that the recv function was reading part of the next data packet, a packet that i didn''t realize was getting sent.
thanks for the help,
mike.
thanks for the help,
mike.
Well, there was a huge thread about this recently here
It''s long, and there''s a lot of name calling. There is also a lot of good information explaining what is happening.
It''s long, and there''s a lot of name calling. There is also a lot of good information explaining what is happening.
quote:Original post by tangentz
The "extra" bytes are the header used by TCP/IP or UDP or
whatever protocol you''re using.
Kami no Itte ga ore ni zettai naru!
Hmmm, no. The transport and network layer gooble these pieces of information (the headers) up (unless you are using raw sockets.)
I hope that was just a mental fart and not a serious answer...
Dire Wolf
www.digitalfiends.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement