Interrupt driven socket I/O

Interrupt driven socket I/O

Post by Marco Sarani » Sun, 30 Jun 1996 04:00:00

hi netters,

I'm writing a simple set of communication functions, based on
sockets. The basic requirement is that *no* polling should be done to
detect incoming data. An user-supplied function has to be
automatically called when a socket has data waiting to be read.

As far as I know this should be possible since a SIGIO signal should
be issued when such a condition occurs.

Unfortunately, I'm not able to set asynchronous notification of
pending I/O requests on my Linux machine. The whole thing is made
possible on an HP/UX system via the two following ioctl calls:

ioctl(socket, SIOCSPGRP, &prcid);

ioctl(socket, FIOASYNC, &flag);

any suggestion, or pointer to some documentation, will be
appreciated. Thanksalot


1. Interrupt driven socket I/O in SUN/Solaris2.5 ?


I try to set up a interrupt driven socket routine that would react
on any incoming data (connection demand and normal data). I work
with AF_INET SOCK_STREAM sockets.

I cannot use fork to handle separate connections: I want to handle
them in the same program. So I have one "connection listening" socket
that accept connections and creates normal sockets. I want my interrupt
routine to test for an accept, then to read any incoming data on
the already existing sockets...

It seems that fcntl( sock, F_SETL, FASYNC ) nor fcntl( sock, F_SETOWN...)
works under solaris.

I almost succeed, but it seems that secondary sockets does not inherit
the non-blocking/interrupt-generation properties of the primary socket.

Reply by email please.


| CEA/Cadarache, DER/SSAE/LSMI, bat 205    |
| 13108 St-Paul-Lez-Durance, FRANCE        |
| tel: (+33) 42254292  fax: (+33) 42252780 |
|                  |

2. LILO Problem with SCSI Disk and DOS

3. Sockets and interrupt driven I/O

4. Switch or Hub, Point-to-Point & Client/Server?

5. Interrupt driven socket I/O

6. Problems with PAS SCSI and the 3xi

7. interrupt driven socket handler.

8. LD_PRELOAD and setuid programs?

9. Interrupted system call and sockets --> Help

10. Best way to interrupt socket send()?

11. Sockets & interrupts

12. interrupting socket read/write calls

13. How many interrupts used in socket program?