Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!ames!sdcsvax!ucbvax!EMPTYS.CC.UMICH.EDU!mts From: mts@EMPTYS.CC.UMICH.EDU (Michael T. Stolarchuk) Newsgroups: comp.protocols.tcp-ip Subject: Re: HELP: select() under sockets Message-ID: <8709090100.AA06470@emptys.cc.umich.edu> Date: Tue, 8-Sep-87 21:00:15 EDT Article-I.D.: emptys.8709090100.AA06470 Posted: Tue Sep 8 21:00:15 1987 Date-Received: Thu, 10-Sep-87 01:40:38 EDT References: <8709081702.AA00208@apolling.imagen.uucp> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 34 Umm, I just looked into /usr/include/stdio.h on our apollo system: Changelog entry: 10/01/82 jrw increased _NFILE from 20 to 128..... So using NFILE is probably NOT the way to go, unless you declare readfds, et al as arrays (this leads one to wonder, of course, why the existing apollo software works at all -- since I know of no code that actually uses arrays with select. Probably because no one actually opens more than 32 file descriptors and only THEN creates a socket...). How about 4.3? Where select is: nfound = select(nfds, readfds, writefds, exceptfds, timeout) int nfound, nfds; fd_set *readfds, *writefds, *exceptfds; struct timeval *timeout; And you have: FD_SET(fd, &fdset) FD_CLR(fd, &fdset) FD_ISSET(fd, &fdset) FD_ZERO(&fdset) And fd_set is: typedef struct fd_set { fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)]; } fd_set; And FD_SETSIZE is 256. mts. the snail. imagine him at 100 mhp.