/** * Supports finding peers through Tor. Community run DNS entry points will be used. * * @param netParams Network parameters to be used for port information. */ public TorDiscovery(NetworkParameters netParams, TorClient torClient) { this(netParams.getDnsSeeds(), netParams, torClient); }
/** * Supports finding peers through Tor. Community run DNS entry points will be used. * * @param netParams Network parameters to be used for port information. */ public TorDiscovery(NetworkParameters netParams, TorClient torClient) { this(netParams.getDnsSeeds(), netParams, torClient); }
/** * Supports finding peers through DNS A records. Community run DNS entry points will be used. * * @param netParams Network parameters to be used for port information. */ public DnsDiscovery(NetworkParameters netParams) { this(netParams.getDnsSeeds(), netParams); }
/** * Supports finding peers through DNS A records. Community run DNS entry points will be used. * * @param netParams Network parameters to be used for port information. */ public DnsDiscovery(NetworkParameters netParams) { this(netParams.getDnsSeeds(), netParams); }
/** * Supports finding peers through DNS A records. Community run DNS entry points will be used. * * @param netParams Network parameters to be used for port information. */ public DnsDiscovery(NetworkParameters netParams) { this(netParams.getDnsSeeds(), netParams); }
/** * Supports finding peers through DNS A records. Community run DNS entry points will be used. * * @param netParams Network parameters to be used for port information. */ public DnsDiscovery(NetworkParameters netParams) { this(netParams.getDnsSeeds(), netParams); }
/** * Builds a suitable set of peer discoveries. Will query them in parallel before producing a merged response. * If specific services are required, DNS is not used as the protocol can't handle it. * @param params Network to use. * @param services Required services as a bitmask, e.g. {@link VersionMessage#NODE_NETWORK}. */ public static MultiplexingDiscovery forServices(NetworkParameters params, long services) { List<PeerDiscovery> discoveries = Lists.newArrayList(); HttpDiscovery.Details[] httpSeeds = params.getHttpSeeds(); if (httpSeeds != null) { OkHttpClient httpClient = new OkHttpClient(); for (HttpDiscovery.Details httpSeed : httpSeeds) discoveries.add(new HttpDiscovery(params, httpSeed, httpClient)); } // Also use DNS seeds if there is no specific service requirement if (services == 0) { String[] dnsSeeds = params.getDnsSeeds(); if (dnsSeeds != null) for (String dnsSeed : dnsSeeds) discoveries.add(new DnsSeedDiscovery(params, dnsSeed)); } return new MultiplexingDiscovery(params, discoveries); }
/** * Builds a suitable set of peer discoveries. Will query them in parallel before producing a merged response. * If specific services are required, DNS is not used as the protocol can't handle it. * @param params Network to use. * @param services Required services as a bitmask, e.g. {@link VersionMessage#NODE_NETWORK}. */ public static MultiplexingDiscovery forServices(NetworkParameters params, long services) { List<PeerDiscovery> discoveries = Lists.newArrayList(); HttpDiscovery.Details[] httpSeeds = params.getHttpSeeds(); if (httpSeeds != null) { OkHttpClient httpClient = new OkHttpClient(); for (HttpDiscovery.Details httpSeed : httpSeeds) discoveries.add(new HttpDiscovery(params, httpSeed, httpClient)); } // Also use DNS seeds if there is no specific service requirement if (services == 0) { String[] dnsSeeds = params.getDnsSeeds(); if (dnsSeeds != null) for (String dnsSeed : dnsSeeds) discoveries.add(new DnsSeedDiscovery(params, dnsSeed)); } return new MultiplexingDiscovery(params, discoveries); }
/** * Builds a suitable set of peer discoveries. Will query them in parallel before producing a merged response. * If specific services are required, DNS is not used as the protocol can't handle it. * @param params Network to use. * @param services Required services as a bitmask, e.g. {@link VersionMessage#NODE_NETWORK}. */ public static MultiplexingDiscovery forServices(NetworkParameters params, long services) { List<PeerDiscovery> discoveries = Lists.newArrayList(); HttpDiscovery.Details[] httpSeeds = params.getHttpSeeds(); if (httpSeeds != null) { OkHttpClient httpClient = new OkHttpClient(); for (HttpDiscovery.Details httpSeed : httpSeeds) discoveries.add(new HttpDiscovery(params, httpSeed, httpClient)); } // Also use DNS seeds if there is no specific service requirement if (services == 0) { String[] dnsSeeds = params.getDnsSeeds(); if (dnsSeeds != null) for (String dnsSeed : dnsSeeds) discoveries.add(new DnsSeedDiscovery(params, dnsSeed)); } return new MultiplexingDiscovery(params, discoveries); }
/** * Builds a suitable set of peer discoveries. Will query them in parallel before producing a merged response. * If specific services are required, DNS is not used as the protocol can't handle it. * @param params Network to use. * @param services Required services as a bitmask, e.g. {@link VersionMessage#NODE_NETWORK}. */ public static MultiplexingDiscovery forServices(NetworkParameters params, long services) { List<PeerDiscovery> discoveries = Lists.newArrayList(); HttpDiscovery.Details[] httpSeeds = params.getHttpSeeds(); if (httpSeeds != null) { OkHttpClient httpClient = new OkHttpClient(); for (HttpDiscovery.Details httpSeed : httpSeeds) discoveries.add(new HttpDiscovery(params, httpSeed, httpClient)); } // Also use DNS seeds if there is no specific service requirement if (services == 0) { String[] dnsSeeds = params.getDnsSeeds(); if (dnsSeeds != null) for (String dnsSeed : dnsSeeds) discoveries.add(new DnsSeedDiscovery(params, dnsSeed)); } return new MultiplexingDiscovery(params, discoveries); }