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

Group of private broadcast related members&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class PrivateBroadcast;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:CConnman/PrivateBroadcast/NumToOpen.adoc[`NumToOpen`] 
| Get the pending number of connections to open&period;
| xref:CConnman/PrivateBroadcast/NumToOpenAdd.adoc[`NumToOpenAdd`] 
| Increment the number of new connections of type `ConnectionType&colon;&colon;PRIVATE&lowbar;BROADCAST` to be opened by `CConnman&colon;&colon;ThreadPrivateBroadcast()`&period;
| xref:CConnman/PrivateBroadcast/NumToOpenSub.adoc[`NumToOpenSub`] 
| Decrement the number of new connections of type `ConnectionType&colon;&colon;PRIVATE&lowbar;BROADCAST` to be opened by `CConnman&colon;&colon;ThreadPrivateBroadcast()`&period;
| xref:CConnman/PrivateBroadcast/NumToOpenWait.adoc[`NumToOpenWait`] 
| Wait for the number of needed connections to become greater than 0&period;
| xref:CConnman/PrivateBroadcast/PickNetwork.adoc[`PickNetwork`] 
| Choose a network to open a connection to&period;
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:CConnman/PrivateBroadcast/m_outbound_tor_ok_at_least_once.adoc[`m&lowbar;outbound&lowbar;tor&lowbar;ok&lowbar;at&lowbar;least&lowbar;once`] 
| Remember if we ever established at least one outbound connection to a Tor peer, including sending and receiving P2P messages&period; If this is true then the Tor proxy indeed works and is a proxy to the Tor network, not a misconfigured ordinary SOCKS5 proxy as &hyphen;proxy or &hyphen;onion&period; If that is the case, then we assume that connecting to an IPv4 or IPv6 address via that proxy will be done through the Tor network and a Tor exit node&period;
| xref:CConnman/PrivateBroadcast/m_sem_conn_max.adoc[`m&lowbar;sem&lowbar;conn&lowbar;max`] 
| Semaphore used to guard against opening too many connections&period; Opening private broadcast connections will be paused if this is equal to 0&period;
|===


== Protected Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:CConnman/PrivateBroadcast/ProxyForIPv4or6.adoc[`ProxyForIPv4or6`] 
| Check if private broadcast can be done to IPv4 or IPv6 peers and if so via which proxy&period; If private broadcast connections should not be opened to IPv4 or IPv6, then this will return an empty optional&period;
|===


== Protected Data Members

[cols="1,4"]
|===
| Name| Description
| xref:CConnman/PrivateBroadcast/m_num_to_open.adoc[`m&lowbar;num&lowbar;to&lowbar;open`] 
| Number of `ConnectionType&colon;&colon;PRIVATE&lowbar;BROADCAST` connections to open&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:ConnmanTestMsg.adoc[ConnmanTestMsg]`
| Test harness that exposes CConnman internals for unit tests&period;
|===


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