| Package | Description |
|---|---|
| net.i2p.router | The I2P router application handles I2P network communication. |
| net.i2p.router.dummy | Dummy implementations and stub classes for testing purposes. |
| net.i2p.router.transport | Transport layer implementations and management for I2P network communication. |
| net.i2p.router.transport.ntcp | The NTCP (New TCP) transport for I2P, allowing I2P messages to be passed
over TCP connections. |
| net.i2p.router.transport.udp | The UDP transport (also known as 'SSU' or Secure Semi-reliable UDP transport)
for I2P, allowing I2P messages to be passed over UDP connections. |
| Modifier and Type | Method and Description |
|---|---|
void | OutNetMessagePool.add(OutNetMessage msg)Add a new outbound network message to the pool for delivery. |
abstract void | CommSystemFacade.processMessage(OutNetMessage msg)Queue an outbound message for delivery through the appropriate transport. |
void | MessageHistory.replyTimedOut(OutNetMessage sentMessage)The message wanted a reply but no reply came in the time expected |
| Modifier and Type | Method and Description |
|---|---|
void | VMCommSystem.processMessage(OutNetMessage msg)The router wants us to send the given message to the peer. |
| Modifier and Type | Method and Description |
|---|---|
protected OutNetMessage | TransportImpl.getNextMessage()Nonblocking call to pull the next outbound message
off the queue. |
OutNetMessage | PrioritySendPool.poll()Return the highest-priority message, or null if empty. |
OutNetMessage | OutboundMessageRegistry.registerPending(MessageSelector replySelector,
ReplyJob onReply,
Job onTimeout)Registers a new, empty OutNetMessage, with the reply and timeout jobs specified. |
| Modifier and Type | Method and Description |
|---|---|
List<OutNetMessage> | OutboundMessageRegistry.getOriginalMessages(I2NPMessage message)Retrieve all messages that are waiting for the specified message. |
| Modifier and Type | Method and Description |
|---|---|
protected void | TransportImpl.afterSend(OutNetMessage msg,
boolean sendSuccessful)The transport is done sending this message |
protected void | TransportImpl.afterSend(OutNetMessage msg,
boolean sendSuccessful,
boolean allowRequeue)The transport is done sending this message |
protected void | TransportImpl.afterSend(OutNetMessage msg,
boolean sendSuccessful,
boolean allowRequeue,
long msToSend)The transport is done sending this message. |
protected void | TransportImpl.afterSend(OutNetMessage msg,
boolean sendSuccessful,
long msToSend)The transport is done sending this message |
(package private) static void | GetBidsJob.fail(RouterContext context,
OutNetMessage msg)Fail a message and trigger failure callbacks |
(package private) TransportBid | TransportManager.getBid(OutNetMessage msg)Get the best bid for a message across all transports. |
(package private) List<TransportBid> | TransportManager.getBids(OutNetMessage msg)Get all bids for a message across all transports. |
(package private) static void | GetBidsJob.getBids(RouterContext context,
TransportManager tmgr,
OutNetMessage msg)Transport bids for a message and send it if a suitable bid is found |
(package private) TransportBid | TransportManager.getNextBid(OutNetMessage msg)Get the best bid, skipping failed transports and unreachable peers. |
boolean | PrioritySendPool.offer(OutNetMessage msg)Non-blocking offer with priority eviction. |
void | CommSystemFacadeImpl.processMessage(OutNetMessage msg)Process and route an outbound message through the transport system. |
void | OutboundMessageRegistry.registerPending(OutNetMessage msg)Register the message. |
void | TransportImpl.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). |
void | Transport.send(OutNetMessage msg)Asynchronously send a message to the specified peer. |
void | OutboundMessageRegistry.unregisterPending(OutNetMessage msg) |
| Modifier and Type | Method and Description |
|---|---|
void | PrioritySendPool.drainTo(ArrayList<OutNetMessage> target)Drain all messages into the target list (for resize). |
| Modifier and Type | Method and Description |
|---|---|
void | NTCPSendFinisher.add(OutNetMessage msg)Adds a message to the finishing queue to call afterSend asynchronously. |
void | NTCPTransport.afterSend(OutNetMessage msg,
boolean sendSuccessful,
boolean allowRequeue,
long msToSend)afterSend. |
void | NTCPConnection.send(OutNetMessage msg)toss the message onto the connection's send queue |
(package private) void | NTCPTransport.sendComplete(OutNetMessage msg)queue up afterSend call, which can take some time w/ jobs, etc |
| Modifier and Type | Method and Description |
|---|---|
OutNetMessage | OutboundMessageState.getMessage() |
OutNetMessage | InboundEstablishState.getNextQueuedMessage()Pull from the message queue |
OutNetMessage | OutboundEstablishState.getNextQueuedMessage()Get the next queued message. |
| Modifier and Type | Method and Description |
|---|---|
void | OutboundMessageFragments.add(OutNetMessage msg)Add a new message to the active pool |
void | InboundEstablishState.addMessage(OutNetMessage msg)Queue a message to be sent after the session is established. |
void | OutboundEstablishState.addMessage(OutNetMessage msg)Queue a message to be sent after the session is established. |
void | EstablishmentManager.establish(OutNetMessage msg)Send the message to its specified recipient by establishing a connection
with them and sending it off. |
void | UDPTransport.failed(OutNetMessage msg,
String reason)Handle a failed outbound network message. |
void | UDPTransport.send(OutNetMessage msg) |
(package private) void | UDPTransport.sendIfEstablished(OutNetMessage msg)Send only if established, otherwise fail immediately. |
| Modifier and Type | Method and Description |
|---|---|
(package private) void | UDPTransport.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. |
| Constructor and Description |
|---|
OutboundMessageState(I2PAppContext context,
OutNetMessage m,
PeerState peer)Normal constructor. |