I’m working on a test app to find the best way to handle selecting off of
file descriptors (specifically input from the serial port) and Receive()
from processes that want to send data to it (send messages that will be
output on that particular serial port). I haven’t found a way to mix the
select and Receive stuff yet (if it is even possible) without implementing
timeouts (I’d prefer to not have to put timeouts in on the select call if I
don’t have to).
Is there a way to do this, either handle the Receives on the select call, or
vice-versa (handle the select through the Receive call)? If it’s not
possible, I could always throw a second process into the app, one that
handles read()ing off the serial port, Send()s the data to the other
process, while the other one Receive()s requests and data from the other
process, and write()s out the serial port if it needs to. I’d prefer to
keep it within one process however if possible.
Any help is appreciated! TIA!