Packages that use PeerState2
Package
Description
SSU2, the UDP transport: datagram sessions with Holepunch peer discovery, plus the older SSU compatibility code.
Uses of PeerState2 in net.i2p.router.transport.udp
Fields in net.i2p.router.transport.udp declared as PeerState2Modifier and TypeFieldDescriptionprivate PeerState2PeerTestState._aliceAlice's peer state, when we are Bob.private PeerState2InboundEstablishState2._pstateThe peer state being built, once created.private PeerState2OutboundEstablishState2._pstateThe peer state being built, once created.private final PeerState2IntroductionManager.DelayIntro.bobBob's peer state being relayed through.private final PeerState2PeerTestManager.DelayTest.fromPeerThe peer state of the requester.Fields in net.i2p.router.transport.udp with type parameters of type PeerState2Modifier and TypeFieldDescriptionprivate final ConcurrentHashMap<Long, PeerState2> IntroductionManager._nonceToAliceMap of relay nonce to Alice PeerState who requested it.private final Map<Long, PeerState2> UDPTransport._peersByConnIDConnected peers, by connection id.Methods in net.i2p.router.transport.udp that return PeerState2Modifier and TypeMethodDescriptionOutboundEstablishState2.confirmedPacketsSent(UDPPacket[] packets) Note that we just sent the SessionConfirmed packets and save them for retransmission.PeerTestState.getAlice()Return Alice's PeerState2 (SSU2 only).InboundEstablishState2.getPeerState()The completed PeerState, or null if we have not received the session confirmed.OutboundEstablishState2.getPeerState()The peer state for this connection.(package private) PeerState2UDPTransport.getPeerState(long rcvConnID) Peer state by SSU2 connection ID.private PeerState2InboundEstablishState2.locked_receiveSessionConfirmed(UDPPacket packet) Process SessionConfirmed and create the peer state, with the lock held.InboundEstablishState2.receiveSessionConfirmed(UDPPacket packet) Receive the last messages in the handshake, and create the PeerState.Methods in net.i2p.router.transport.udp with parameters of type PeerState2Modifier and TypeMethodDescriptionPacketBuilder2.buildACK(PeerState2 peer) Build the ack packet.PacketBuilder2.buildPacket(List<PacketBuilder2.Fragment> fragments, PeerState2 peer) Build a packet from multiple fragments.PacketBuilder2.buildPacket(OutboundMessageState state, int fragment, PeerState2 peer) This builds a data packet (PAYLOAD_TYPE_DATA).PacketBuilder2.buildPeerTestFromAlice(byte[] signedData, PeerState2 bob) Build a packet as Alice, to Bob to begin a peer test.PacketBuilder2.buildPeerTestToAlice(int code, Hash charlieHash, byte[] signedData, PeerState2 alice) Build a packet as Bob to Alice, with the response from Charlie, or a rejection by Bob.PacketBuilder2.buildPeerTestToAlice(int code, Hash charlieHash, byte[] signedData, SSU2Payload.Block riBlock, PeerState2 alice) Build a packet as Bob to Alice, with the response from Charlie, or a rejection by Bob.PacketBuilder2.buildPeerTestToBob(int code, byte[] signedData, PeerState2 bob) Build a packet as Charlie to Bob verifying that we will help test Alice.PacketBuilder2.buildPeerTestToCharlie(Hash aliceHash, byte[] signedData, SSU2Payload.Block riBlock, PeerState2 charlie) Build a packet as Bob to Charlie to help test Alice.PacketBuilder2.buildPing(PeerState2 peer) A DATA packet with padding only.(package private) UDPPacketPacketBuilder2.buildRelayIntro(byte[] signedData, SSU2Payload.Block riBlock, PeerState2 charlie) From Bob to Charlie.(package private) UDPPacketPacketBuilder2.buildRelayRequest(byte[] signedData, PeerState2 bob) From Alice to Bob.(package private) UDPPacketPacketBuilder2.buildRelayResponse(byte[] signedData, PeerState2 state) From Charlie to Bob or Bob to Alice.(package private) voidUDPTransport.changePeerAddress(PeerState2 peer, RemoteHostId newAddress) Remove and add to peersByRemoteHost map.(package private) voidIntroductionManager.receiveRelayIntro(PeerState2 bob, Hash alice, byte[] data) Processes a relay introduction message received from another peer.private booleanIntroductionManager.receiveRelayIntro(PeerState2 bob, Hash alice, byte[] data, int retryCount) We are Charlie and we got this from Bob.private booleanIntroductionManager.receiveRelayIntro(PeerState2 bob, Hash alice, byte[] data, RouterInfo aliceRI) We are Charlie and we got this from Bob.(package private) voidIntroductionManager.receiveRelayRequest(PeerState2 alice, byte[] data) We are Bob and we got this from Alice.(package private) voidEstablishmentManager.receiveRelayResponse(PeerState2 bob, long nonce, int code, byte[] data) We are Alice, we sent a RelayRequest to Bob and got a RelayResponse back.(package private) voidIntroductionManager.receiveRelayResponse(PeerState2 peer, int status, byte[] data) We are Bob and we got this from Charlie, OR we are Alice and we got this from Bob.voidPeerTestManager.receiveTest(RemoteHostId from, PeerState2 fromPeer, int msg, int status, Hash h, byte[] data) Entry point for all in-session incoming packets.private voidPeerTestManager.receiveTest(RemoteHostId from, PeerState2 fromPeer, int msg, int status, Hash h, byte[] data, byte[] addrBlockIP, int addrBlockPort) Called from above for in-session 1-4 or the PTCallback via processPayload() for out-of-session 5-7private booleanPeerTestManager.receiveTest(RemoteHostId from, PeerState2 fromPeer, int msg, Hash h, byte[] data, int retryCount) Status 0 only, Msg 2 and 4 only, SSU 2 only.private voidPeerTestManager.sendRejectToAlice(int reason, byte[] data, PeerState2 alice) Send reject to Alice.private voidIntroductionManager.sendRelayRejectLimit(PeerState2 bob, byte[] data) Sends a relay reject when Bob is over the limit.private booleanEstablishmentManager.sendRelayRequest(long tag, PeerState2 bob, OutboundEstablishState charlie) We are Alice, send a RelayRequest to Bob.private voidPeerTestManager.sendRIandPT(RouterInfo ri, int status, Hash hash, byte[] data, PeerState2 to, long now) Send RI and Peer Test.voidPeerTestState.setAlice(PeerState2 alice) Alice's PeerState2 (SSU2 only).Constructors in net.i2p.router.transport.udp with parameters of type PeerState2ModifierConstructorDescriptionDelayIntro(PeerState2 b, Hash a, byte[] d) Schedules a delayed introduction relay.DelayTest(RemoteHostId f, PeerState2 fp, int m, Hash h, byte[] d) Schedules itself.PeerStateDestroyed(RouterContext ctx, UDPTransport transport, PeerState2 peer) This must be called after the first termination or termination ack was sent fromPeerState2, so the next packet number is correct.