|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.i2p.router.transport.udp.OutboundMessageFragments
class OutboundMessageFragments
Coordinate the outbound fragments and select the next one to be built.
This pool contains messages we are actively trying to send, essentially
doing a round robin across each message to send one fragment, as implemented
in getNextVolley(). This also honors per-peer throttling, taking
note of each peer's allocations. If a message has each of its fragments
sent more than a certain number of times, it is failed out. In addition,
this instance also receives notification of message ACKs from the
InboundMessageFragments, signaling that we can stop sending a
message.
| Nested Class Summary | |
|---|---|
static interface |
OutboundMessageFragments.ActiveThrottle
|
| Field Summary | |
|---|---|
(package private) static int |
MAX_VOLLEYS
if we can handle more messages explicitly, set this to true |
| Constructor Summary | |
|---|---|
OutboundMessageFragments(RouterContext ctx,
UDPTransport transport,
OutboundMessageFragments.ActiveThrottle throttle)
|
|
| Method Summary | |
|---|---|
void |
add(OutboundMessageState state)
short circuit the OutNetMessage, letting us send the establish complete message reliably |
void |
add(OutNetMessage msg)
Add a new message to the active pool |
void |
add(PeerState peer)
Add the peer to the list of peers wanting to transmit something. |
(package private) void |
dropPeer(PeerState peer)
|
UDPPacket[] |
getNextVolley()
Fetch all the packets for a message volley, blocking until there is a message which can be fully transmitted (or the transport is shut down). |
void |
shutdown()
|
void |
startup()
|
boolean |
waitForMoreAllowed()
Block until we allow more messages to be admitted to the active pool. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final int MAX_VOLLEYS
| Constructor Detail |
|---|
public OutboundMessageFragments(RouterContext ctx,
UDPTransport transport,
OutboundMessageFragments.ActiveThrottle throttle)
| Method Detail |
|---|
public void startup()
public void shutdown()
void dropPeer(PeerState peer)
public boolean waitForMoreAllowed()
OutboundRefiller
public void add(OutNetMessage msg)
public void add(OutboundMessageState state)
public void add(PeerState peer)
public UDPPacket[] getNextVolley()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||