I have to write a program that writes on a serial port but sometimes the. SerialPort.Write method hanging, timeout not. } catch (Exception ex.
Πρέπει να για να μπορέσετε να εισάγετε νέο μήνυμα και να έχετε πλήρης πρόσβαση στο forum. Url2 sifteam e1 movies.
If you are using hardware handshaking, the bytes will not be written untill the proper handshaking pin states have been reached. So you could time out waiting for the other device to signal that it is ready for more data, idicating a buffer full at its end, or the device is simply off line. If you have hardware hadshaking turned off, or have it jumpered out on the serial port (RTS to CTS), then the only time you could possibly time out is writing bytes to the device faster that they can be sent over the line. Eventually you will fill up the output buffers and block (assuming that you are not using async io). If the driver can not clear the buffers fast enough, you could time out on your write, if you have the time out set too short.