Re: strange TCP stack behiviour with write()es in pieces

dean gaudet (dean-list-linux-kernel@arctic.org)
Wed, 2 Jan 2002 11:46:16 -0800 (PST)


On Wed, 2 Jan 2002, Michal Moskal wrote:

> void send_packet(int cmd, void *data, int len)
> {
> struct header h = { cmd, len };
>
> write(fd, &h, sizeof(h));
> write(fd, data, len);
> }

you should look into writev(2).

you might also want to look at this paper
<http://www.isi.edu/~johnh/PAPERS/Heidemann97a.html>, it's probably
similar to the problems you're seeing.

-dean

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/