Timeout support for RXTX OutputStream.write()

R

Ralph Lecher

Hi!

With the RXTX Comm API is there a way to avoid OutputStream.write()
blocking the application if the targeted serial device doesn't take
over the offered data. I only found SerialPort.enableReceiveTimeout(),
which I hope prevents at least InputStream.read() from heading towards
Nirvana.

TIA

Ralph
 
K

Knute Johnson

Ralph said:
Hi!

With the RXTX Comm API is there a way to avoid OutputStream.write()
blocking the application if the targeted serial device doesn't take
over the offered data. I only found SerialPort.enableReceiveTimeout(),
which I hope prevents at least InputStream.read() from heading towards
Nirvana.

TIA

Ralph

It shouldn't block which just shows that RXTX has numerous bugs. Use
Sun's JavaComm API. They support the Linux version and the Windows
version still works fine (at least on XP). Your only other option is to
buffer it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top