Archived

This topic is now archived and is closed to further replies.

Packet Size Problem...

This topic is 5623 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 ?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites