Closed gchauvet closed 8 years ago
It all depends on how you set your port. I get always -1 when there is no data available... (on linux). You can control if you have blocking or non-blocking. Google "rxtx java blocking"
okay, this is possible :+1:
port.enableReceiveTimeout(200);
Solve my "issue"
Thank you !
See #27, and my comment there. You're right, the out-of-box behaviour is unintuitive, but I suspect it's actually the Windows behaviour that's wrong. Either way, better documentation is needed. Thank you for the feedback.
Hello,
I notice a different behavior between Windows (>= xp) and Linux :
Under Windows, I can read message "Waiting" until ENQ code was reached. Under Linux, my code is stuck on the first input.read() call. In my real usecase, I use this loop to reach a lapse of time before throwing a TimeoutException.
Is it possible to have the same behavior between Windows & Linux ?