Advertisement

Data transfer progress

Started by July 02, 2002 05:41 AM
20 comments, last by Fma 22 years, 6 months ago

Fingh,

I was under the impression that using TCP/IP, which is a stream based protocol, you don''t dictate packet size from the size of the data you submit in a send command. As such your comment still doesn''t make sense to me. After all, if you do a send with a 1meg buffer, it doesn''t try to send a 1 meg packet, its splits it for you depending on the MTB or whatever its called. Sure you have to re-assemble at the other end whatever, but your comment indicated there was an issue with the send.

For UDP, my current understanding is that packets get dropped rather than fragmented. Again, looking at Q2 source (my old standby ), JC doesn''t do anything to reassemble packets from what I can see. He''s set the size to 1400, but IIRC hes since said that was probably overly conservative.
Correct, to a point. I''m not implying that you determine the actual packet size, TCP does. But if you send() smaller packets, it is less likely that TCP will need to fragment any individual packet to meet it''s MTU requirements (for ease of discussion we''ll ignore nagling). Yes, some packets will get fragmented, as we''ve discussed already. There is another LONG obnoxious thread regarding how TCP streams data, I''d prefer not to get into it again here.

As far as UDP, you are correct also. UDP packets get dropped, therefore, you have to handle it in your code... Not really sure how that was unclear.

Hope I''ve cleared up any miscommunication.

This topic is closed to new replies.

Advertisement