org.gudy.azureus2.plugins.dht.mainline
Interface MainlineDHTProvider


public interface MainlineDHTProvider

The interface that a plugin (or a helper class) must implement to enable DHT support inside Azureus. By implementing this class, and then registering it via MainlineDHTManager.setProvider(MainlineDHTProvider), Azureus will indicate DHT support via the BT handshake, and exchange PORT messages with other clients - passing received messages to this class.


Method Summary
 int getDHTPort()
          Returns the DHT port used by the plugin.
 void notifyOfIncomingPort(String ip_addr, int port)
          This method is called by Azureus when a PORT message is received by a peer.
 

Method Detail

notifyOfIncomingPort

void notifyOfIncomingPort(String ip_addr,
                          int port)
This method is called by Azureus when a PORT message is received by a peer. Note: When this method is called, try to make sure that it won't take long to return - if it needs to do something time-consuming, then the work should be delegated to another thread.

Parameters:
ip_addr - IP address of peer.
port - DHT port of peer.

getDHTPort

int getDHTPort()
Returns the DHT port used by the plugin.