I'm not sure 'connected' does what you think it does. It tells you whether the remote-side address has been bound to the socket such that you can send via the socket without specifying a destination address. It is unclear to me whether some action on the remote side would cause connected() to stop returning the address that the socket was (and probably still is) bound to.
The way I would tell that the socket needs to be reconnected would be to note that I got an error when I tried to send.
- tye
In reply to Re^2: Check if Socket is alive before send ("connected")
by tye
in thread Check if Socket is alive before send
by baddah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |