Package net.i2p.client.streaming.impl
Class PacketQueue
java.lang.Object
net.i2p.client.streaming.impl.PacketQueue
- All Implemented Interfaces:
Closeable,AutoCloseable,SendMessageStatusListener
class PacketQueue extends Object implements SendMessageStatusListener, Closeable
Queue out packets to be sent through the session.
Well, thats the theory at least... in practice we just
send them immediately with no blocking, since the
mode=bestEffort doesnt block in the SDK.
MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PacketQueue(I2PAppContext context, SimpleTimer2 timer) -
Method Summary
Modifier and Type Method Description voidclose()Cannot be restarted.booleanenqueue(PacketLocal packet)Add a new packet to be sent out ASAP.voidmessageStatus(I2PSession session, long msgId, int status)SendMessageStatusListener interface Tell the client of an update in the send status for a message previously sent with I2PSession.sendMessage().
-
Constructor Details
-
Method Details
-
close
public void close()Cannot be restarted.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Since:
- 0.9.14
-
enqueue
Add a new packet to be sent out ASAP. This updates the acks. keys and tags disabled since dropped in I2PSession- Returns:
- true if sent
-
messageStatus
SendMessageStatusListener interface Tell the client of an update in the send status for a message previously sent with I2PSession.sendMessage(). Multiple calls for a single message ID are possible.- Specified by:
messageStatusin interfaceSendMessageStatusListener- Parameters:
session- session notifyingmsgId- message number returned from a previous sendMessage() callstatus- of the message, as defined in MessageStatusMessage and this class.- Since:
- 0.9.14
-