Interrupt driven socket I/O

Interrupt driven socket I/O

Post by Wing Chu » Tue, 12 Jul 1994 08:46:24

Hi wizards,

I am working on a client-server type program, and wishes to use interrupt
driven socket I/O. The server (a separate process) will perform something
else when there is no message from the client. The reason that I chose interrupt
driven socket I/O allows the server to poll the sockets only when necessary.

I followed all the steps described in the Sun Network programming guide, and
have developed two C++ classes which allows me to send and receive messages
between the client and the server using the normal polling mechanism. But,
the interrupt driven socket does not work. The only time when the server
receives a SIGIO is when I first start up a client (and the client asks for
calls connect(). ). Sending messages down the socket does not generate a SIGIO.

Do I need to setup my machine (Sparc IPC) before I can use interrupt socket
driven I/O?

Also, in the NPG, in the same paragraph with the interrupt driven socket I/O,
it mentioned that we can also install a handler for SIGURG in the same way
as the SIGIO handler. (please refer to the manual for details). Is it an
implication that the sockets are also capable of generating SIGURG?

Thanks in advance

Wing C.

Canon Information Systems Research Australia Phone +61 2 805 2976
P.O. Box 313 North Ryde, NSW, Australia 2113 Fax:  +61 2 805 2929


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. Legato backup on solaris 9: Any good ?

3. Sockets and interrupt driven I/O

4. How to reactivate lm_sensors after compiling Kernel?

5. interrupt driven socket handler.

6. Question about two ADSL connection

7. Interrupt driven socket I/O

8. active directory authentication

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?