|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.transport.udp.OutboundMessageState
Maintain the outbound fragmentation for resending
Field Summary | |
static int |
MAX_FRAGMENTS
|
Constructor Summary | |
OutboundMessageState(I2PAppContext context)
|
Method Summary | |
void |
acked(int[] ackedFragments)
Ack all the fragments in the ack list |
void |
fragment(int fragmentSize)
Prepare the message for fragmented delivery, using no more than fragmentSize bytes per fragment. |
int |
fragmentSize(int fragmentNum)
|
int |
getFragmentCount()
how many fragments in the message |
long |
getLifetime()
|
int |
getMaxSends()
|
OutNetMessage |
getMessage()
|
long |
getMessageId()
|
long |
getNextSendTime()
|
PeerState |
getPeer()
|
int |
getPushCount()
|
boolean |
initialize(I2NPMessage msg,
PeerState peer)
|
boolean |
initialize(OutNetMessage msg)
|
boolean |
isComplete()
|
boolean |
isExpired()
|
boolean |
isFragmented()
|
int |
pickNextFragment()
Pick a fragment that we still need to send. |
void |
push()
note that we have pushed the message fragments |
void |
releaseResources()
|
void |
setNextSendTime(long when)
|
boolean |
shouldSend(int fragmentNum)
should we continue sending this fragment? |
java.lang.String |
toString()
|
int |
writeFragment(byte[] out,
int outOffset,
int fragmentNum)
Write a part of the the message onto the specified buffer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int MAX_FRAGMENTS
Constructor Detail |
public OutboundMessageState(I2PAppContext context)
Method Detail |
public boolean initialize(OutNetMessage msg)
public boolean initialize(I2NPMessage msg, PeerState peer)
public void releaseResources()
public OutNetMessage getMessage()
public long getMessageId()
public PeerState getPeer()
public boolean isExpired()
public boolean isComplete()
public long getLifetime()
public void acked(int[] ackedFragments)
public long getNextSendTime()
public void setNextSendTime(long when)
public int getMaxSends()
public int getPushCount()
public void push()
public boolean isFragmented()
public void fragment(int fragmentSize)
public int getFragmentCount()
public boolean shouldSend(int fragmentNum)
public int fragmentSize(int fragmentNum)
public int pickNextFragment()
public int writeFragment(byte[] out, int outOffset, int fragmentNum)
out
- target to writeoutOffset
- into outOffset to begin writingfragmentNum
- fragment to write (0 indexed)
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |