Will 4.2 select() catch OOB socket messages?
Sean Casey
sean at ms.uky.edu
Mon Jun 13 13:10:19 AEST 1988
I'm writing a real-time game program where a server multiplexes input
from a number of clients. Most of it works pretty well (thanks matt at oddjob),
but I can't seem to pick up Out Of Band messages with select().
I'm calling select() with a read fdset and an exception fdset. The time
value is infinite (NULL). When data comes in, the select returns and all is
well, but if a client sends an OOB, the select does not return as it should.
In other words, it seems to be ignoring OOB messages. According to all the
documentation I can find, the only exceptional condition for sockets is out
of band transmissions, and therefore I assume that if all is well, an OOB
sent will cause the select to return.
Did I assume wrong? I can code around it, but OOB messages seem to be an
ideal way of sending a "flush input buffer" command. Perhaps there's
something I need to be doing.
I did try setting the process group and trapping SIGURG, and sure enough,
the OOB messages are getting there. I just can't make select recognise
them.
Anyone know what I might be doing wrong?
Sean
--
*** Sean Casey sean at ms.uky.edu, sean at ukma.bitnet
*** The Empire Defenestrator {rutgers,uunet}!ukma!sean
*** ``I'm not gonna mail it, YOU mail it. I'M not gonna mail it... Hey! Let's
*** send it to Rutgers! Yeah! They won't mail it. They return everything.''
More information about the Comp.unix.wizards
mailing list