Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!umd5!zben From: zben@umd5.umd.edu (Ben Cranston) Newsgroups: comp.protocols.tcp-ip Subject: Re: HELP: select() under sockets Message-ID: <1923@umd5.umd.edu> Date: Tue, 8-Sep-87 15:45:26 EDT Article-I.D.: umd5.1923 Posted: Tue Sep 8 15:45:26 1987 Date-Received: Thu, 10-Sep-87 02:07:13 EDT References: <8709061618.AA14584@topaz.rutgers.edu> Reply-To: zben@umd5 (Ben Cranston) Organization: University of Maryland, College Park Lines: 26 Summary: Set first arg to NUMBER OF BITS IN YOUR MASKS! In article <8709061618.AA14584@topaz.rutgers.edu> ron@TOPAZ.RUTGERS.EDU (Ron Natalie) writes: > The definition of the first argument to the socket is the maximum file > descriptor that can be specified in any of the other fields. You set > it to one ... Set the value to something > larger like the maximum number of file descriptors (NFILE). (Hiya Ron!) People have been talking about setting NFILE bigger than 32, so I think it is worth mentioning that the first argument to select is used to tell it the width of the bitmaps in the succeeding arguments. So if they are INTs you probably want to set it to 32. Of course, if your system DOES have NFILE set bigger than 32 and you happen to get a FD with a higher number, that (1<31) diehorribly("fix this mess") else { num = select( 32 , (1<