Packages that use PeerState
Package
Description
SSU2, the UDP transport: datagram sessions with Holepunch peer discovery, plus the older SSU compatibility code.
Helpers and handlers for the router console user interface, packaged in routerconsole.war and accessible only from JSP files.
Uses of PeerState in net.i2p.router.transport.udp
Subclasses of PeerState in net.i2p.router.transport.udpModifier and TypeClassDescriptionclassContain all of the state about a UDP connection to a peer.Classes in net.i2p.router.transport.udp that implement interfaces with type arguments of type PeerStateModifier and TypeClassDescriptionprivate static classFor picking introducers.Fields in net.i2p.router.transport.udp declared as PeerStateModifier and TypeFieldDescriptionprivate final PeerStatePeerTestState._bobBob's peer state, when we are Alice or Charlie.private final PeerStateOutboundMessageState._peerWill be null, unless we are part of the establishment.private final PeerStateSimpleBandwidthEstimator._stateThe peer state being estimated.Fields in net.i2p.router.transport.udp with type parameters of type PeerStateModifier and TypeFieldDescriptionprivate final CopyOnWriteArrayList<PeerState> OutboundMessageFragments._activePeersList of peers currently sending outbound messages.UDPTransport.ExpirePeerEvent._expireBufferScratch list for the peers examined each loop.IntroductionManager._inboundMap of relay tag to Bob PeerState who have given us introduction tags (we are Charlie).IntroductionManager._outboundMap of relay tag to Charlie PeerState that should receive the introduction (we are Bob).UDPTransport._peersByIdentMap of known peers, keyed by their identity hash.private final Map<RemoteHostId, PeerState> UDPTransport._peersByRemoteHostMap of known peers, keyed by their remote host and port.private final CopyOnWriteArrayList<PeerState> OutboundMessageFragments._peersToRemoveThe peers to remove from the pool.Methods in net.i2p.router.transport.udp that return PeerStateModifier and TypeMethodDescriptionPeerTestState.getBob()Return Bob's PeerState.OutboundMessageState.getPeer()The peer.(package private) PeerStateUDPTransport.getPeerState(Hash remotePeer) The peer state for the peer with the given ident, or null if no state exists.(package private) PeerStateUDPTransport.getPeerState(RemoteHostId hostInfo) Retrieves the current connection state for a peer identified by their remote host and port.private PeerStateEstablishmentManager.handleCompletelyEstablished(OutboundEstablishState state) Ok, fully received, add it to the established cons and send any queued messages.(package private) PeerStateUDPTransport.pickTestPeer(PeerTestState.Role peerRole, int version, boolean isIPv6, RemoteHostId dontInclude) Pick a Bob (if we are Alice) or a Charlie (if we are Bob).(package private) PeerStateEstablishmentManager.receiveData(OutboundEstablishState state) A data packet arrived on an outbound connection being established, which means its complete (yay!).Methods in net.i2p.router.transport.udp that return types with arguments of type PeerStateMethods in net.i2p.router.transport.udp with parameters of type PeerStateModifier and TypeMethodDescriptionvoidRegister the peer's relay tags.voidOutboundMessageFragments.add(List<OutboundMessageState> states, PeerState peer) Short circuit the OutNetMessage, letting us send multiple messages reliably and efficiently.voidOutboundMessageFragments.add(OutboundMessageState state, PeerState peer) Short circuit the OutNetMessage, letting us send the establish complete message reliably.voidAdd the peer to the list of peers wanting to transmit something.(package private) booleanUDPTransport.addRemotePeerState(PeerState peer) Adds a new peer state or replaces an existing one if the peer identity or address changes.(package private) voidUDPTransport.changePeerPort(PeerState peer, int newPort) Remove and add to peersByRemoteHost map.int(package private) voidRemove a peer from the active outbound list and drop its pending messages.(package private) voidThis does not send a session destroy, caller must do that if desired.static intPacketBuilder2.getMaxAdditionalFragmentSize(PeerState peer, int numFragments, int curDataSize) Will a packet to 'peer' that already has 'numFragments' fragments totalling 'curDataSize' bytes fit another fragment? This includes the 3 byte block overhead, but NOT the 5 byte followon fragment overhead.static intPacketBuilder2.getMaxDataSize(PeerState peer) Calculates the maximum payload size that can be sent to this peer in a single data packet.(package private) booleanUDPTransport.isIdleEstablished(PeerState peer, long now, long maxIdleTime) Is the peer idle in both directions past the threshold, disregarding send failures.(package private) voidTransfer the basic activity/state from the old peer to the current peerprivate booleanUDPTransport.locked_addRemotePeerState(PeerState peer) Adds a connected peer under the add/drop lock.private voidUDPTransport.locked_dropPeer(PeerState peer, boolean shouldBanlist, String why) This does not send a session destroy, caller must do that if desired.OutboundMessageFragments.preparePackets(List<OutboundMessageState> states, PeerState peer) Build the packets for one volley.(package private) voidEstablishmentManager.receiveSessionDestroy(RemoteHostId from, PeerState state) Got a SessionDestroy on an established connvoidUnregister the peer's relay tags.booleanThe next few methods are for when we are Alice.(package private) voidUDPTransport.send(List<I2NPMessage> msgs, PeerState peer) "injected" messages from the EstablishmentManager.(package private) voidUDPTransport.send(I2NPMessage msg, List<OutNetMessage> msgs, PeerState peer) "injected" message from the EstablishmentManager, plus pending messages to send, so the messages may be bundled efficiently.(package private) voidUDPTransport.send(I2NPMessage msg, PeerState peer) "injected" message from the EstablishmentManager.(package private) voidUDPTransport.sendDestroy(PeerState peer, int reasonCode) Send a session destroy message, bypassing OMF and PacketPusher.private voidEstablishmentManager.sendInboundComplete(PeerState peer) Send our info immediately, bundled with the ACK of packet 0.Method parameters in net.i2p.router.transport.udp with type arguments of type PeerStateModifier and TypeMethodDescriptionstatic long[]PeerState.getAggregateStats(Collection<PeerState> peers) Compute aggregate transport stats across all peers for tuner visibility.Constructors in net.i2p.router.transport.udp with parameters of type PeerStateModifierConstructorDescriptionOutboundMessageState(I2PAppContext context, I2NPMessage msg, PeerState peer) "injected" message from the establisher.privateOutboundMessageState(I2PAppContext context, OutNetMessage m, I2NPMessage msg, PeerState peer) Fragments the given message for transmission.OutboundMessageState(I2PAppContext context, OutNetMessage m, PeerState peer) Normal constructor.PeerTestState(PeerTestState.Role role, PeerState bob, boolean isIPv6, long nonce, long now) Create a new peer test state for the given role.(package private)SimpleBandwidthEstimator(I2PAppContext ctx, PeerState state) Creates a new bandwidth estimator for the given peer.Uses of PeerState in net.i2p.router.web.helpers
Classes in net.i2p.router.web.helpers that implement interfaces with type arguments of type PeerStateModifier and TypeClassDescription(package private) static classBase comparator for UDP peers that falls back to peer hash comparison.Methods in net.i2p.router.web.helpers that return types with arguments of type PeerStateModifier and TypeMethodDescription(package private) static Comparator<PeerState> UDPSorters.getComparator(int sortFlags) Select the comparator for a column, reversing it for a descending sort.Methods in net.i2p.router.web.helpers with parameters of type PeerStateModifier and TypeMethodDescriptionintOrders peers by send window size.intOrders peers by duplicate packets received.intOrders peers by idle time since the last inbound message.intOrders peers by idle time since the last outbound message.intOrders peers by transmit MTU, falling back to receive MTU.intOrders peers by peer hash, giving the subclass comparisons a tiebreak.intOrders peers by inbound rate over the sampled minute.intOrders peers by outbound rate over the sampled minute.intOrders peers by messages received.intOrders peers by retransmitted packets.intOrders peers by retransmission timeout.intOrders peers by round trip time.intOrders peers by messages sent.intOrders peers by measured clock skew.intOrders peers by slow start threshold.intOrders peers by how long the session has been established.private static booleanPeerHelper.includeSSU(PeerState peer, int peerCount, long now) Whether an SSU peer is recent enough to render.private voidPeerHelper.renderSSURow(StringBuilder buf, PeerState peer, long now, boolean debugmode, PeerHelper.SSUTotals totals) Append one SSU peer row and accumulate its stats into totals.