Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: rstevens@noao.edu (W. Richard Stevens)
Subject: Re: UDP and TCP message limits?
Date: 1996/05/22	[thread overview]
Message-ID: <4nv1oi$fi3@noao.edu> (raw)
In-Reply-To: 4nttm0$kh2@MICRO-HEART-OF-GOLD.MIT.EDU


> Is there some systematic way that a person (or even better, a program)
> might  learn about the limits to what can be written successfully to a
> UDP or TCP socket and received by the other end?

UDP: the socket send buffer size is the limit on the largest UDP datagram
that you can send (SO_SNDBUF).  If it's not big enough, increase it with
setsockopt().

TCP: you should be able to write as much as you want, and if this exceeds
the socket send buffer size, you are just put to sleep.  (This assume the
default blocking socket.)  what you describe sounds like a bug.

> These are, of course, totally weird numbers, and I'd expect them to be
> different on different systems.

The UDP limit of 9216 = 8192 + 1024.  It's for 8k of data, plus the
IP/UDP/RPC headers for an NFS request.

	Rich Stevens



      reply	other threads:[~1996-05-22  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-22  4:00 UDP and TCP message limits? John Chambers
1996-05-22  4:00 ` W. Richard Stevens [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox