It's possible to setup a serial port communication using hardware flow control with the RTS/CTS pins (CRTSCTS flag for tcsetattr), but there is no way to use the DTR/DSR pins for flow control in a reliable and efficient way.
One can use the TIOCMGET ioctl() to check the pin state, but then we need to send one byte at a time, which makes it VERY SLOW!
Isn't there a better way? Making our own cables doesn't scale and there are many POS serial printers on the market that only use DTR/DSR flow control.
P.S.- Forget XON/XOFF, I need reliable 8-bit communication.