com.google.bitcoin.net.discovery
Class IrcDiscovery

java.lang.Object
  extended by com.google.bitcoin.net.discovery.IrcDiscovery
All Implemented Interfaces:
PeerDiscovery

Deprecated.

@Deprecated
public class IrcDiscovery
extends Object
implements PeerDiscovery

IrcDiscovery provides a way to find network peers by joining a pre-agreed rendevouz point on the LFnet IRC network. This class is deprecated because LFnet has ceased to operate and DNS seeds now exist for both prod and test networks. It may conceivably still be useful for running small ad-hoc networks by yourself.


Constructor Summary
IrcDiscovery(String channel)
          Deprecated. Finds a list of peers by connecting to an IRC network, joining a channel, decoding the nicks and then disconnecting.
IrcDiscovery(String channel, String server, int port)
          Deprecated. Finds a list of peers by connecting to an IRC network, joining a channel, decoding the nicks and then disconnecting.
 
Method Summary
 InetSocketAddress[] getPeers(long timeoutValue, TimeUnit timeoutUnit)
          Deprecated. Returns a list of peers that were found in the IRC channel.
protected  void onIRCReceive(String message)
          Deprecated.  
protected  void onIRCSend(String message)
          Deprecated.  
 void shutdown()
          Deprecated. Stops any discovery in progress when we want to shut down quickly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IrcDiscovery

public IrcDiscovery(String channel)
Deprecated. 
Finds a list of peers by connecting to an IRC network, joining a channel, decoding the nicks and then disconnecting.

Parameters:
channel - The IRC channel to join, either "#bitcoin" or "#bitcoinTEST3" for the production and test networks respectively.

IrcDiscovery

public IrcDiscovery(String channel,
                    String server,
                    int port)
Deprecated. 
Finds a list of peers by connecting to an IRC network, joining a channel, decoding the nicks and then disconnecting.

Parameters:
server - Name or textual IP address of the IRC server to join.
channel - The IRC channel to join, either "#bitcoin" or "#bitcoinTEST3" for the production and test networks
Method Detail

onIRCSend

protected void onIRCSend(String message)
Deprecated. 

onIRCReceive

protected void onIRCReceive(String message)
Deprecated. 

shutdown

public void shutdown()
Deprecated. 
Description copied from interface: PeerDiscovery
Stops any discovery in progress when we want to shut down quickly.

Specified by:
shutdown in interface PeerDiscovery

getPeers

public InetSocketAddress[] getPeers(long timeoutValue,
                                    TimeUnit timeoutUnit)
                             throws PeerDiscoveryException
Deprecated. 
Returns a list of peers that were found in the IRC channel. Note that just because a peer appears in the list does not mean it is accepting connections. The given time out value is applied for every IP returned by DNS for the given server, so a timeout value of 1 second may result in 5 seconds delay if 5 servers are advertised.

Specified by:
getPeers in interface PeerDiscovery
Throws:
PeerDiscoveryException


Copyright © 2014. All rights reserved.