Package net.i2p.router.transport.udp
Class PacketHandler
java.lang.Object
net.i2p.router.transport.udp.PacketHandler
class PacketHandler extends Object
Pull inbound packets from the inbound receiver's queue, figure out what
peer session they belong to (if any), authenticate and decrypt them
with the appropriate keys, and push them to the appropriate handler.
Data and ACK packets go to the InboundMessageFragments, the various
establishment packets go to the EstablishmentManager, and, once implemented,
relay packets will go to the relay manager. At the moment, this is
an actual pool of packet handler threads, each pulling off the inbound
receiver's queue and pushing them as necessary.
-
Constructor Summary
Constructors Constructor Description PacketHandler(RouterContext ctx, UDPTransport transport, EstablishmentManager establisher, InboundMessageFragments inbound, PeerTestManager testManager, IntroductionManager introManager)
-
Method Summary
Modifier and Type Method Description (package private) String
getHandlerStatus()
void
queueReceived(UDPPacket packet)
Blocking call to retrieve the next inbound packet, or null if we have shut down.UDPPacket
receiveNext()
Blocking call to retrieve the next inbound packet, or null if we have shut down.void
shutdown()
void
startup()
-
Constructor Details
-
PacketHandler
PacketHandler(RouterContext ctx, UDPTransport transport, EstablishmentManager establisher, InboundMessageFragments inbound, PeerTestManager testManager, IntroductionManager introManager)
-
-
Method Details
-
startup
public void startup() -
shutdown
public void shutdown() -
getHandlerStatus
String getHandlerStatus() -
queueReceived
Blocking call to retrieve the next inbound packet, or null if we have shut down.- Throws:
InterruptedException
- Since:
- IPv6 moved from UDPReceiver
-
receiveNext
Blocking call to retrieve the next inbound packet, or null if we have shut down.- Since:
- IPv6 moved from UDPReceiver
-