[comp.sys.ncr] WIN/TCP more socket questions/problems

tore%fdata.UUCP@nac.no (Tore Ingholm) (09/20/90)

Hi,
Since I had positive responses to my earlyer request in this list,
I will try again with some more problems to be solved. I have not
received all the documentation yet (32/700), so please excuse me if some
of this is trivial.

1. I am using select() to wait for data to be read from both a pipe
   and a socket. Select returns with nfound = 1 but the bitmask is
   zero, there is no way to identify which descriptor was ready for
   reading. Perhaps this functionality is not supported for pipes, or
   am I doing something wrong?

   int readfds, nfound;

   readfds = (1 << Socket_fd) | (1 << Pipe_fd);
   nfound = select(MAXFDS, (int *)&readfds, 0, 0, (struct timeval *)0);
   --- nfound is 1 and readfds is 0

2. How do I set nonblocking I/O on a TCP-socket, functionality similar to the 
   nonblocking() call in Towernet lib. I have looked at the header file
   inetioctl.h and tried with ioctl(s, FIONBIO, 0), but this resulted
   in errno = 2 after next recv(). As said earlier, I am missing some
   documentation, so I have to ask here, how should this be done right?

3. How do I arrange for delivery of a given signal upon receipt of data
   on a TCP-socket, functionality similar to the async() call in Towernet lib? 

-- 
     Tore Ingholm                        mail: mcsun!nuug!fdata!tore    
     Fellesdata AS 			       (or) tore%fdata.UUCP@nac.no
     Box 248 Skoeyen, 			 tel:  +47-2 ( 52-86-13 / 52-80-80 )
     N-0212 OSLO 2, NORWAY 		 fax:  +47 2 52 85 10