|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.bitcoin.core.DnsDiscovery
public class DnsDiscovery
Supports peer discovery through DNS.
This class does not support the testnet as currently there are no DNS servers providing testnet hosts. If this class is being used for testnet you must specify the hostnames to use.
Failure to resolve individual host names will not cause an Exception to be thrown. However, if all hosts passed fail to resolve a PeerDiscoveryException will be thrown during getPeers().
Constructor Summary | |
---|---|
DnsDiscovery(NetworkParameters netParams)
Supports finding peers through DNS A records. |
|
DnsDiscovery(String[] hostNames,
NetworkParameters netParams)
Supports finding peers through DNS A records. |
Method Summary | |
---|---|
static String[] |
getDefaultHostNames()
Returns the well known discovery host names on the production network. |
InetSocketAddress[] |
getPeers()
Returns an array of addresses. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DnsDiscovery(NetworkParameters netParams)
netParams
- Network parameters to be used for port information.public DnsDiscovery(String[] hostNames, NetworkParameters netParams)
hostNames
- Host names to be examined for seed addresses.netParams
- Network parameters to be used for port information.Method Detail |
---|
public InetSocketAddress[] getPeers() throws PeerDiscoveryException
PeerDiscovery
getPeers
in interface PeerDiscovery
PeerDiscoveryException
public static String[] getDefaultHostNames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |