Is it possible to read (and write) from two serial ports at the same time?
I mean, using 'fread' to read from a serial port would block the php program flow, and I'm not able to see if some signal is available on the other port.
For example :
while (true) {
$a = readSerial( "COM1" );
$b = readSerial( "COM2" );
if ( $a )
do something
if ( $b )
do something
}
This code would work only if the 'fread' inside the function readSerial is non-blocking.
Thanks,
Stefano