From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1103af,f7be7fce5647049e X-Google-Attributes: gid1103af,public X-Google-Thread: f9325,f7be7fce5647049e X-Google-Attributes: gidf9325,public X-Google-Thread: f678f,f7be7fce5647049e X-Google-Attributes: gidf678f,public From: rstevens@noao.edu (W. Richard Stevens) Subject: Re: UDP and TCP message limits? Date: 1996/05/22 Message-ID: <4nv1oi$fi3@noao.edu>#1/1 X-Deja-AN: 156097584 references: <4nttm0$kh2@MICRO-HEART-OF-GOLD.MIT.EDU> organization: National Optical Astronomy Observatories, Tucson, AZ, USA newsgroups: comp.os.linux.misc,comp.unix.osf.misc,comp.protocols.tcp-ip > 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