[#CConnman-DisconnectNode-06]
= xref:CConnman.adoc[CConnman]::DisconnectNode
:relfileprefix: ../
:mrdocs:

`DisconnectNode` overloads

== Synopses

Declared in `&lt;net&period;h&gt;`

Disconnect the peer with the given id, returning whether it was found&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f2e2b74a068), requires&lowbar;capability(0x7f2e28942d78), requires&lowbar;capability(0x7f2e234d1f58), requires&lowbar;capability(0x7f2e2737e6f8), requires&lowbar;capability(0x7f2e235efd88), requires&lowbar;capability(0x7f2e2a34be78), requires&lowbar;capability(0x7f2e219f8c48), requires&lowbar;capability(0x7f2e21c83b08), requires&lowbar;capability(0x7f2e1aa36668), requires&lowbar;capability(0x7f2e376b8748), requires&lowbar;capability(0x7f2e433ce2d8)&rsqb;&rsqb;
bool
xref:CConnman/DisconnectNode-0f.adoc[DisconnectNode](xref:NodeId-08.adoc[NodeId] id);
----

[.small]#xref:CConnman/DisconnectNode-0f.adoc[_» more&period;&period;&period;_]#

Disconnect the peer(s) matching the given node string, returning whether any matched&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f2e2b749ca8), requires&lowbar;capability(0x7f2e289429b8), requires&lowbar;capability(0x7f2e234d1b98), requires&lowbar;capability(0x7f2e2737e338), requires&lowbar;capability(0x7f2e235ef9c8), requires&lowbar;capability(0x7f2e2a34bab8), requires&lowbar;capability(0x7f2e219f8888), requires&lowbar;capability(0x7f2e21c83748), requires&lowbar;capability(0x7f2e1aa362a8), requires&lowbar;capability(0x7f2e376b8388), requires&lowbar;capability(0x7f2e433cdf18)&rsqb;&rsqb;
bool
xref:CConnman/DisconnectNode-0d.adoc[DisconnectNode](std::string&lowbar;view node);
----

[.small]#xref:CConnman/DisconnectNode-0d.adoc[_» more&period;&period;&period;_]#

Disconnect all peers at the given address, returning whether any matched&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f2e2b749f28), requires&lowbar;capability(0x7f2e28942c38), requires&lowbar;capability(0x7f2e234d1e18), requires&lowbar;capability(0x7f2e2737e5b8), requires&lowbar;capability(0x7f2e235efc48), requires&lowbar;capability(0x7f2e2a34bd38), requires&lowbar;capability(0x7f2e219f8b08), requires&lowbar;capability(0x7f2e21c839c8), requires&lowbar;capability(0x7f2e1aa36528), requires&lowbar;capability(0x7f2e376b8608), requires&lowbar;capability(0x7f2e433ce198)&rsqb;&rsqb;
bool
xref:CConnman/DisconnectNode-01.adoc[DisconnectNode](xref:CNetAddr.adoc[CNetAddr] const& addr);
----

[.small]#xref:CConnman/DisconnectNode-01.adoc[_» more&period;&period;&period;_]#

Disconnect all peers within the given subnet, returning whether any matched&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f2e2b749de8), requires&lowbar;capability(0x7f2e28942af8), requires&lowbar;capability(0x7f2e234d1cd8), requires&lowbar;capability(0x7f2e2737e478), requires&lowbar;capability(0x7f2e235efb08), requires&lowbar;capability(0x7f2e2a34bbf8), requires&lowbar;capability(0x7f2e219f89c8), requires&lowbar;capability(0x7f2e21c83888), requires&lowbar;capability(0x7f2e1aa363e8), requires&lowbar;capability(0x7f2e376b84c8), requires&lowbar;capability(0x7f2e433ce058)&rsqb;&rsqb;
bool
xref:CConnman/DisconnectNode-04.adoc[DisconnectNode](xref:CSubNet.adoc[CSubNet] const& subnet);
----

[.small]#xref:CConnman/DisconnectNode-04.adoc[_» more&period;&period;&period;_]#

== Return Value

* true if the peer was found and disconnected&period;
* true if at least one peer was disconnected&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *id*
| the id of the peer to disconnect&period;
| *node*
| the host string identifying the peer(s) to disconnect&period;
| *addr*
| the address whose peers should be disconnected&period;
| *subnet*
| the subnet whose peers should be disconnected&period;
|===


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