* Kent Boortz <[EMAIL PROTECTED]> [010909 17:49] wrote:
> 
> I want to run an application with the OS set to send small TCP packets
> to spot programming errors like assuming that a write of 100 bytes on
> a socket can be read in a single read operation. It may work most of
> the time but break at some point. So if I could configure FreeBSD to
> use small packets I can spot these programming errors faster.
> 
> How can I do this?  I can't just set the MTU on the interface right?
> Can I use sysctl "net.inet.tcp.sendspace" or some other configuration?
> Can I set it as low as sending one byte of data in each packet?  Will
> this still not help, i.e. if we are not reading fast enough we will
> get all 100 bytes we wrote in a single read even if the packets were
> small? Is there another way to force the behaviour that read() on a
> socket just return a few bytes at the time?
> 
> Sorry if this is a stupid question, I haven't gone deep enough in
> Stevens "TCP/IP Illustrated" to understand things like this yet,

there's a setsockopt for this called TCP_NODELAY in netinet/tcp.h.

you should read further into stevens before posting such questions.

-- 
-Alfred Perlstein [[EMAIL PROTECTED]]
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to