Date: Mon, 3 Jun 1996 16:29:21 +0100 (BST) From: Rich Deighton To: djgpp AT delorie DOT com Subject: Re: I/O Multiplexor In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 3 Jun 1996, Eli Zaretskii wrote: > > On Sat, 1 Jun 1996, Orlando Andico wrote: > > > Forgive my ignorance, but what's the use of having select () on a single > > threaded file system? (of course, this is not mentioning the nonexistent > > sockets library.. ;) > > I can think of a few uses: > > 1) Portability. How else would you write a program that polls > the keyboard in a way that would run on both MS-DOS and Unix? > > 2) An infrastructure for implementing file-system extensions, like > the sockets. > > Anyway, this thread was started when somebody asked what should they use > instead of `select', probably because they don't know DJGPP *has* > `select'. They didn't tell why did they need it. > I must apologise for failing to grep for select() in the djgpp header files. However, I was a little heart broken to see that the tcp library for djgpp seems to handle sockets in an nonconvenient way. I realise that it's only version 0.11 or some such thing, but there are some vast problems in using it for anything useful. I was looking for select() so that I could, at regular intervals, poll a set of file descriptors for input. The tcp library not only re-defines fd_set, select, etc but also doesn't use "valid" file descriptors. Therefore you can't use one select call for a set of fd's containing sockets as well as stdio handles. This makes things a tad messy. Are there any other TCP/IP implementations that could be compiled up under DJGPP? I have a great need for TCP/IP in a bunch of client/server stuff I'm working on under Linux and porting, with DJGPP to DOS. I've got too use to the GNU C extensions to use a commercial C compiler. Any help would be appreciated. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Rich Deighton 18 The Promenade, Victoria Park, | | (0115) 9509163 Nottingham, England. NG3 1HB.| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+