## Uses of Class
net.i2p.client.streaming.Packet

Packages that use Packet
net.i2p.client.streaming: Implements a TCP-like (reliable, authenticated, in order) set of sockets for communicating over the IP-like (unreliable, unauthenticated, unordered) I2P messages.

Uses of Packet in net.i2p.client.streaming

Subclasses of Packet in net.i2p.client.streaming
`(package private) class` `PacketLocal` coordinate local attributes about a packet - send time, ack time, number of retries, etc.

Methods in net.i2p.client.streaming with parameters of type Packet
`(package private) void` `PacketHandler.displayPacket(Packet packet, String prefix, String suffix)`
`Connection` `ConnectionManager.receiveConnection(Packet synPacket)` Create a new connection based on the SYN packet we received.
`void` `ConnectionHandler.receiveNewSyn(Packet packet)` Non-SYN packets with a zero SendStreamID may also be queued here so that they don't get thrown away while the SYN packet before it is queued.

`(package private) void`

`PacketHandler.receivePacket(Packet packet)`
private boolean choke(Packet packet) { if (true) return true; //if ( (_dropped == 0) && true ) { //&& (_manager.getSent() <= 0) ) { // _dropped++; // return false; //} if (true) { // artificial choke: 2% random drop and a 0-5s // random tiered delay from 0-30s if (_context.random().nextInt(100) >= 98) { displayPacket(packet, "DROP", null); return false; } else { // if (true) return true; // no lag, just drop // int delay = _context.random().nextInt(5*1000); int delay = _context.random().nextInt(1*1000); int delayFactor = _context.random().nextInt(100); if (delayFactor > 80) { if (delayFactor > 98) delay *= 5; else if (delayFactor > 95) delay *= 4; else if (delayFactor > 90) delay *= 3; else delay *= 2; } if (_context.random().nextInt(100) >= 20) delay = _lastDelay; _lastDelay = delay; SimpleTimer.getInstance().addEvent(new Reinject(packet, delay), delay); return false; } } else { return true; } } private class Reinject implements SimpleTimer.TimedEvent { private Packet _packet; private int _delay; public Reinject(Packet packet, int delay) { _packet = packet; _delay = delay; } public void timeReached() { _log.debug("Reinjecting after " + _delay + ": " + _packet); receivePacketDirect(_packet); } }

`(package private) void` `ConnectionPacketHandler.receivePacket(Packet packet, Connection con)` distribute a packet to the connection specified
`(package private) void` `PacketHandler.receivePacketDirect(Packet packet, boolean queueIfNoConn)`