The current implementation of verifying ACK when sending a command doesn't work if you send two commands at the same time (eg. from different threads). Implement some sort of receive queue and use callbacks instead of blocking?? Exceptions could be raised long after the command has been sent?
Furthermore, there is no locking performed when actually writing or constructing the packet, so two threads sending at the same time will likely cause problems.
The current implementation of verifying ACK when sending a command doesn't work if you send two commands at the same time (eg. from different threads). Implement some sort of receive queue and use callbacks instead of blocking?? Exceptions could be raised long after the command has been sent?
Furthermore, there is no locking performed when actually writing or constructing the packet, so two threads sending at the same time will likely cause problems.