owolablo wrote:
> Hi,
> I'm writing a program that sends 1500 bytes of data at once, from the
> client to the server. However, the packet is broken down into 3
> different segments of 500 each before getting to the server. This is
> detrimental to the program i'm writing as I need the server to receive
> the entire 1500 bytes at once. How do I avoid this segmentation. Is it
> a linux setting which I can change or is it a TCP setting? either way,
> what can I do? I'm sending the packets using the C send() function.
>
TCP sends streams which the IP layer assembles into packets. If you want
one transmitted packet to correspond with one received packet, then you
need to use UDP instead (but you lose the TCP-layer error checking).
Now IP packets themselves may be split along the way to their
destination into multiple fragments which get reassembled when they
arrive; that happens if the "maximum segment size" (MSS) along the
packet's route isn't large enough to accommodate the packets -
presumably that isn't what you are worried about.
Robert
|