let me be more specific. I'd like to connect to tcp server at the start. Then before each send, I'd like to check if tcp port is still connected, otherwise I should reconnect...
I know the first part, but am not sure how to check whether tcp connection is active and how to reconnect...