+1 We also need that.
Thanks for your answer, but that seems not to work, at least on windows.
I understood that "Connected()" does not inform the real connection status. I need to get error from a Read/Write function. The question is, which error codes indicate that I should try to connect again? For example, doing some tests, I think theses error codes mean I should try to reconnect: 599677, 665414, 12582912. But, for example, error "Address out of range" is not a connection problem. Trying to reconnect would not help. So, which error codes means I should try to reconnect? Thanks.