[#Sock-IsConnected] = xref:Sock.adoc[Sock]::IsConnected :relfileprefix: ../ :mrdocs: Check if still connected. == Synopsis Declared in `<util/sock.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] virtual bool IsConnected(std::string& errmsg) const; ---- == Return Value true if connected [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *errmsg* [out] | The error string, if the socket has been disconnected. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#