Packages that use OutNetMessage
Package
Description
The I2P router application handles I2P network communication.
Simplified fake implementations of router interfaces (comm system and friends) for testing and embedded builds.
The Kademlia distributed hash table (DHT) network database: lookup, store and explore jobs, the data store, the floodfill variants, and lookup throttling.
Transport framework: the transport lifecycle and pool management, connection handling and bandwidth throttling for the transports (NTCP2 over TCP, SSU over UDP) that carry I2P messages between routers, plus NAT traversal via UPnP and GeoIP country lookups.
NTCP2, the TCP transport: framed, ratchet-encrypted and mutually authenticated connections between routers.
SSU2, the UDP transport: datagram sessions with Holepunch peer discovery, plus the older SSU compatibility code.
Tunnel pool management: pool lifecycle, peer selection, build scheduling and failure handling for client and exploratory tunnels.
Uses of OutNetMessage in net.i2p.router
Methods in net.i2p.router with parameters of type OutNetMessageModifier and TypeMethodDescriptionvoidOutNetMessagePool.add(OutNetMessage msg) Add a new outbound network message to the pool for delivery.abstract voidCommSystemFacade.processMessage(OutNetMessage msg) Queue an outbound message for delivery through the appropriate transport.voidMessageHistory.replyTimedOut(OutNetMessage sentMessage) The message wanted a reply but no reply came in the time expected.private booleanOutNetMessagePool.validate(OutNetMessage msg) Validate an outbound message before adding it to the pool.Uses of OutNetMessage in net.i2p.router.dummy
Methods in net.i2p.router.dummy with parameters of type OutNetMessageModifier and TypeMethodDescriptionvoidVMCommSystem.processMessage(OutNetMessage msg) The router wants us to send the given message to the peer.Uses of OutNetMessage in net.i2p.router.networkdb.kademlia
Fields in net.i2p.router.networkdb.kademlia declared as OutNetMessageModifier and TypeFieldDescriptionprivate OutNetMessageDirectLookupJob._onmThe lookup message awaiting a reply.private OutNetMessageSingleSearchJob._onmThe lookup message awaiting a reply.private OutNetMessageFloodOnlySearchJob._outThis is a marker to register with the MessageRegistry, it is never sent.private OutNetMessageIterativeSearchJob._outThis is a marker to register with the MessageRegistry, it is never sent.Uses of OutNetMessage in net.i2p.router.transport
Fields in net.i2p.router.transport with type parameters of type OutNetMessageModifier and TypeFieldDescriptionprivate final Set<OutNetMessage> OutboundMessageRegistry._activeMessagesSet of active OutNetMessage (for quick removal and selector fetching).private ArrayList<OutNetMessage> PrioritySendPool._messagesSorted live region is[_head, size);[0, _head)is dequeued-but-not-yet-discarded.Methods in net.i2p.router.transport that return OutNetMessageModifier and TypeMethodDescriptionprotected OutNetMessageTransportImpl.getNextMessage()Nonblocking call to pull the next outbound message off the queue.PrioritySendPool.poll()Return the highest-priority message, or null if empty.OutboundMessageRegistry.registerPending(MessageSelector replySelector, ReplyJob onReply, Job onTimeout) Registers a new, empty OutNetMessage, with the reply and timeout jobs specified.Methods in net.i2p.router.transport that return types with arguments of type OutNetMessageModifier and TypeMethodDescriptionOutboundMessageRegistry.getOriginalMessages(I2NPMessage message) Retrieve all messages that are waiting for the specified message.Methods in net.i2p.router.transport with parameters of type OutNetMessageModifier and TypeMethodDescriptionprotected voidTransportImpl.afterSend(OutNetMessage msg, boolean sendSuccessful) The transport is done sending this message.protected voidTransportImpl.afterSend(OutNetMessage msg, boolean sendSuccessful, boolean allowRequeue) The transport is done sending this message.protected voidTransportImpl.afterSend(OutNetMessage msg, boolean sendSuccessful, boolean allowRequeue, long msToSend) The transport is done sending this message.protected voidTransportImpl.afterSend(OutNetMessage msg, boolean sendSuccessful, long msToSend) The transport is done sending this message.(package private) static voidGetBidsJob.fail(RouterContext context, OutNetMessage msg) Fail a message and trigger failure callbacks.(package private) TransportBidTransportManager.getBid(OutNetMessage msg) The best bid for a message across all transports.(package private) static voidGetBidsJob.getBids(RouterContext context, TransportManager tmgr, OutNetMessage msg) Transport bids for a message and send it if a suitable bid is found.(package private) List<TransportBid> TransportManager.getBids(OutNetMessage msg) All bids for a message across all transports.(package private) TransportBidTransportManager.getNextBid(OutNetMessage msg) The best bid, skipping failed transports and unreachable peers.private intPrioritySendPool.insertPosition(OutNetMessage msg, int from, int to) Binary search for the insertion point — highest priority first, FIFO within same priority (lower seqnum first).booleanPrioritySendPool.offer(OutNetMessage msg) Non-blocking offer with priority eviction.voidCommSystemFacadeImpl.processMessage(OutNetMessage msg) Process and route an outbound message through the transport system.voidOutboundMessageRegistry.registerPending(OutNetMessage msg) Register the message.private voidOutboundMessageRegistry.registerPending(OutNetMessage msg, boolean allowEmpty) Add a message to the pending registry, optionally allowing a null payload.voidTransport.send(OutNetMessage msg) Asynchronously send a message to the specified peer.voidTransportImpl.send(OutNetMessage msg) Asynchronously send the message as requested in the message and, if the send is successful, queue up any msg.getOnSendJob job, and register it with the OutboundMessageRegistry (if it has a reply selector).private voidTransportImpl.unregisterAndDiscard(OutNetMessage msg) Drops a message from the send queue.voidOutboundMessageRegistry.unregisterPending(OutNetMessage msg) Removes a message that is no longer waiting for a reply, so a later reply that still arrives is not handed to a cancelled request.Method parameters in net.i2p.router.transport with type arguments of type OutNetMessageModifier and TypeMethodDescriptionvoidPrioritySendPool.drainTo(ArrayList<OutNetMessage> target) Drain all messages into the target list (for resize).Uses of OutNetMessage in net.i2p.router.transport.ntcp
Fields in net.i2p.router.transport.ntcp declared as OutNetMessageModifier and TypeFieldDescriptionprivate final OutNetMessageNTCPSendFinisher.RunnableEvent._msgThe message whose send finished.Fields in net.i2p.router.transport.ntcp with type parameters of type OutNetMessageModifier and TypeFieldDescriptionprivate final List<OutNetMessage> NTCPConnection._currentOutboundCurrent prepared OutNetMessages, or empty - synchronize on _writeLock.private final PriBlockingQueue<OutNetMessage> NTCPConnection._outboundPending unprepared OutNetMessage instances.Methods in net.i2p.router.transport.ntcp with parameters of type OutNetMessageModifier and TypeMethodDescriptionvoidNTCPSendFinisher.add(OutNetMessage msg) Adds a message to the finishing queue to call afterSend asynchronously.voidNTCPTransport.afterSend(OutNetMessage msg, boolean sendSuccessful, boolean allowRequeue, long msToSend) Notify after the message send attempt completes.private voidNTCPTransport.prepareConnectionForSending(NTCPConnection con, OutNetMessage msg) Prepares the given NTCPConnection for sending the specified message, including checking message types and connection version, sending control info if needed, and ensuring the channel is open.voidNTCPConnection.send(OutNetMessage msg) Queue the message onto the connection's send queue.(package private) voidNTCPTransport.sendComplete(OutNetMessage msg) Queue up the afterSend call, which can take some time with jobs, etc.Method parameters in net.i2p.router.transport.ntcp with type arguments of type OutNetMessageModifier and TypeMethodDescriptionprivate intNTCPConnection.drainOutboundTo(Queue<OutNetMessage> to) Drain any pending outbound messages to a new queue.Constructors in net.i2p.router.transport.ntcp with parameters of type OutNetMessageModifierConstructorDescriptionBuilds the event for one finished send.Uses of OutNetMessage in net.i2p.router.transport.udp
Fields in net.i2p.router.transport.udp declared as OutNetMessageModifier and TypeFieldDescriptionprivate final OutNetMessageOutboundMessageState._messageMay be null if we are part of the establishment.Fields in net.i2p.router.transport.udp with type parameters of type OutNetMessageModifier and TypeFieldDescriptionprivate final Queue<OutNetMessage> InboundEstablishState._queuedMessagesMessages queued while session was being established.private final Queue<OutNetMessage> OutboundEstablishState._queuedMessagesQueued messages.private final ConcurrentHashMap<RemoteHostId, LinkedBlockingQueue<OutNetMessage>> EstablishmentManager._queuedOutboundMap of RemoteHostId to a bounded, thread-safe queue of OutNetMessage instances for peers whose outbound establishment is pending due to concurrency limits.Methods in net.i2p.router.transport.udp that return OutNetMessageModifier and TypeMethodDescriptionOutboundMessageState.getMessage()The message.InboundEstablishState.getNextQueuedMessage()Pull from the message queue.OutboundEstablishState.getNextQueuedMessage()Next queued message.Methods in net.i2p.router.transport.udp with parameters of type OutNetMessageModifier and TypeMethodDescriptionvoidOutboundMessageFragments.add(OutNetMessage msg) Add a new message to the active pool.voidInboundEstablishState.addMessage(OutNetMessage msg) Queue a message to be sent after the session is established.voidOutboundEstablishState.addMessage(OutNetMessage msg) Queue a message to be sent after the session is established.private voidEstablishmentManager.banAndFail(OutNetMessage msg, Hash toHash, String failReason, String banReason, String noHashWarn, String ipAddress, int port, String truncHash, long banDuration, long now, boolean isBanned) Mark the peer unreachable and fail the message.private OutboundEstablishStateEstablishmentManager.createOutboundState(OutNetMessage msg, RemoteHostId to, RemoteHostId maybeTo, RouterIdentity toIdentity, boolean isIndirect, UDPAddress addr, RouterAddress ra, Hash toHash, String truncHash, String ipAddress, int maybePort, long now, boolean isBanned) Create a new outbound establish state for the peer, after verifying that its introducers, MTU, and introduction key are usable.voidEstablishmentManager.establish(OutNetMessage msg) Send the message to its specified recipient by establishing a connection with them and sending it off.private voidEstablishmentManager.establish(OutNetMessage msg, boolean queueIfMaxExceeded) Establishes a connection to send the message, or queues it if the limit is exceeded.voidUDPTransport.failed(OutNetMessage msg, String reason) Handle a failed outbound network message.(package private) static booleanPeerState.isTotalFail(OutNetMessage msg, boolean isInbound, long seqNum) Whether a failed outbound message counts as a total-first-message failure.private voidEstablishmentManager.queueToInboundState(InboundEstablishState inState, OutNetMessage msg) Queue the message on an inbound establish state that's already in progress, or send/fail it immediately if the state is already complete or failed.voidUDPTransport.send(OutNetMessage msg) (package private) voidUDPTransport.sendIfEstablished(OutNetMessage msg) Send only if established, otherwise fail immediately.Method parameters in net.i2p.router.transport.udp with type arguments of type OutNetMessageModifier and TypeMethodDescription(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.Constructors in net.i2p.router.transport.udp with parameters of type OutNetMessageModifierConstructorDescriptionprivateOutboundMessageState(I2PAppContext context, OutNetMessage m, I2NPMessage msg, PeerState peer) Fragments the given message for transmission.OutboundMessageState(I2PAppContext context, OutNetMessage m, PeerState peer) Normal constructor.Uses of OutNetMessage in net.i2p.router.tunnel.pool
Fields in net.i2p.router.tunnel.pool declared as OutNetMessageModifier and TypeFieldDescriptionprivate OutNetMessageTestJob._pendingMessageThe last pending message registered for this instance's round, kept so a reset or drop can unregister it even when the round was registered but never armed (permit refusal).private OutNetMessageTestJob.OnTestReply._sentMessageThe outbound message awaiting its reply.private OutNetMessageTestJob.OnTestTimeout._sentMessageThe outbound message awaiting its reply.Methods in net.i2p.router.tunnel.pool with parameters of type OutNetMessageModifier and TypeMethodDescriptionvoidTestJob.OnTestReply.setSentMessage(OutNetMessage m) Remembers the message so its reply can release it.voidTestJob.OnTestTimeout.setSentMessage(OutNetMessage m) Store the outbound message sent to the gateway for cleanup.