Check if still connected.
Declared in <util/sock.h>
<util/sock.h>
[[nodiscard]] virtual bool IsConnected(std::string& errmsg) const;
true if connected
The return value should not be discarded.