Package org.klomp.snark
Class PeerAcceptor
- java.lang.Object
-
- org.klomp.snark.PeerAcceptor
-
class PeerAcceptor extends 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PeerAcceptor.ProtocolException
A unique exception so we can tell the ConnectionAcceptor about non-BT connections
-
Field Summary
Fields Modifier and Type Field Description (package private) PeerCoordinatorSet
coordinators
-
Constructor Summary
Constructors Constructor Description PeerAcceptor(PeerCoordinator coordinator)
PeerAcceptor(PeerCoordinatorSet coordinators)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connection(I2PSocket socket, InputStream in, OutputStream out)
-
-
-
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, InputStream in, OutputStream out) throws IOException
- Throws:
IOException
-
-