[#Sock-IsConnected]
= xref:Sock.adoc[Sock]::IsConnected
:relfileprefix: ../
:mrdocs:

Check if still connected&period;

== Synopsis

Declared in `&lt;util&sol;sock&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
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&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
