org.klomp.snark
Class PeerAcceptor

java.lang.Object
  extended by org.klomp.snark.PeerAcceptor

public class PeerAcceptor
extends java.lang.Object

Accepts incomming connections from peers. The ConnectionAcceptor will call the connection() method when it detects an incomming BT protocol connection. The PeerAcceptor will then create a new peer if the PeerCoordinator wants more peers.


Field Summary
(package private)  PeerCoordinatorSet coordinators
           
 
Constructor Summary
PeerAcceptor(PeerCoordinator coordinator)
           
PeerAcceptor(PeerCoordinatorSet coordinators)
           
 
Method Summary
 void connection(I2PSocket socket, java.io.InputStream in, java.io.OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coordinators

final PeerCoordinatorSet coordinators
Constructor Detail

PeerAcceptor

public PeerAcceptor(PeerCoordinator coordinator)

PeerAcceptor

public PeerAcceptor(PeerCoordinatorSet coordinators)
Method Detail

connection

public void connection(I2PSocket socket,
                       java.io.InputStream in,
                       java.io.OutputStream out)
                throws java.io.IOException
Throws:
java.io.IOException