Non-blocking sockets/Receiving data in background.

matt robinson yakker at ucrmath.ucr.edu
Sat Jun 2 00:55:11 AEST 1990


Since I was told most of the grunt work I did last quarter won't
work without non-blocking sockets, I thought I would ask someone
to give me a hand.

I am trying to write a socket operation that will read data in the
background (not the background in the shell, but in the background
of a process.), allowing the user to input data, but whenever any-
thing comes across the socket, something will hear it coming, and 
the data will be received, and control will be given back to the 
user.  I'm sure someone has done this before, all I need is a
sketch of which commands to do, in what order.  The big thing with
this program is that the user must be able to work and do things
inside the program, but control will stop when something is received
on the socket (From what I know, read() won't let you receive that
data in a non-blocking method.  Also, will select() work in this
case, or do I need to use SIGIO or SIGURG? )

If you can help at all, please E-mail your response (I'll summarize
if someone would like me to.)

Thanks for your time.



More information about the Comp.unix.questions mailing list