forked from I2P_Developers/i2p.i2p
javadoc fixes part 9 (ticket #1894)
This commit is contained in:
@@ -177,7 +177,7 @@ class Connection {
|
||||
*
|
||||
* @param timeoutMs 0 or negative means wait forever, 5 minutes max
|
||||
* @return true if the packet should be sent, false for a fatal error
|
||||
* will return false after 5 minutes even if timeoutMs is <= 0.
|
||||
* will return false after 5 minutes even if timeoutMs is <= 0.
|
||||
*/
|
||||
public boolean packetSendChoke(long timeoutMs) throws IOException, InterruptedException {
|
||||
long start = _context.clock().now();
|
||||
@@ -635,7 +635,7 @@ class Connection {
|
||||
/**
|
||||
* Always true at the start, even if we haven't gotten a reply on an
|
||||
* outbound connection. Only set to false on disconnect.
|
||||
* For outbound, use getHighestAckedThrough() >= 0 also,
|
||||
* For outbound, use getHighestAckedThrough() >= 0 also,
|
||||
* to determine if the connection is up.
|
||||
*
|
||||
* In general, this is true until either:
|
||||
@@ -961,9 +961,9 @@ class Connection {
|
||||
}
|
||||
|
||||
/**
|
||||
* If the next send time is currently >= 0 (i.e. not "never"),
|
||||
* If the next send time is currently >= 0 (i.e. not "never"),
|
||||
* this may make the next time sooner but will not make it later.
|
||||
* If the next send time is currently < 0 (i.e. "never"),
|
||||
* If the next send time is currently < 0 (i.e. "never"),
|
||||
* this will set it to the time specified, but not later than
|
||||
* options.getSendAckDelay() from now (1000 ms)
|
||||
*/
|
||||
@@ -1328,7 +1328,7 @@ class Connection {
|
||||
* we have to use forceReschedule() instead of schedule() below,
|
||||
* to prevent duplicates in the timer queue.
|
||||
*
|
||||
* don't synchronize this, deadlock with ackPackets->ackReceived->SimpleTimer2.cancel
|
||||
* don't synchronize this, deadlock with ackPackets->ackReceived->SimpleTimer2.cancel
|
||||
*
|
||||
* @return true if the packet was sent, false if it was not
|
||||
*/
|
||||
|
||||
@@ -11,7 +11,7 @@ import net.i2p.util.Log;
|
||||
* delivery, or even the generation of a new packet. This class
|
||||
* is the only one that builds useful outbound Packet objects.
|
||||
*<p>
|
||||
* MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession
|
||||
* MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession
|
||||
*<p>
|
||||
* There's one of these per MessageOutputStream.
|
||||
* It stores no state. It sends everything to the Connection unless
|
||||
@@ -36,7 +36,7 @@ class ConnectionDataReceiver implements MessageOutputStream.DataReceiver {
|
||||
* This tells the flusher in MessageOutputStream whether to flush.
|
||||
* It won't flush if this returns true.
|
||||
*
|
||||
* It was: return con.getUnackedPacketsSent() > 0 (i.e. Nagle)
|
||||
* It was: return con.getUnackedPacketsSent() > 0 (i.e. Nagle)
|
||||
* But then, for data that fills more than one packet, the last part of
|
||||
* the data isn't sent until all the previous packets are acked. Which is very slow.
|
||||
* The poor interaction of Nagle and Delayed Acknowledgements is well-documented.
|
||||
|
||||
@@ -13,7 +13,7 @@ import net.i2p.util.SimpleTimer;
|
||||
* Receive a packet for a particular connection - placing the data onto the
|
||||
* queue, marking packets as acked, updating various fields, etc.
|
||||
*<p>
|
||||
* I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream
|
||||
* I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream
|
||||
*<p>
|
||||
* One of these is instantiated per-Destination
|
||||
* (i.e. per-ConnectionManager, not per-Connection).
|
||||
|
||||
@@ -632,7 +632,7 @@ public class I2PSocketManagerFull implements I2PSocketManager {
|
||||
/**
|
||||
* Like connect() but returns a real Socket, and throws only IOE,
|
||||
* for easier porting of apps.
|
||||
* @param timeout ms if > 0, forces blocking (disables connectDelay)
|
||||
* @param timeout ms if > 0, forces blocking (disables connectDelay)
|
||||
* @since 0.8.4
|
||||
*/
|
||||
public Socket connectToSocket(Destination peer, int timeout) throws IOException {
|
||||
|
||||
@@ -122,7 +122,7 @@ class I2PSocketOptionsImpl implements I2PSocketOptions {
|
||||
* How long we will wait for the ACK from a SYN, in milliseconds.
|
||||
*
|
||||
* Default 60 seconds. Max of 2 minutes enforced in Connection.java,
|
||||
* and it also interprets <= 0 as default.
|
||||
* and it also interprets <= 0 as default.
|
||||
*
|
||||
* @return milliseconds to wait, or -1 if we will wait indefinitely
|
||||
*/
|
||||
@@ -134,7 +134,7 @@ class I2PSocketOptionsImpl implements I2PSocketOptions {
|
||||
* Define how long we will wait for the ACK from a SYN, in milliseconds.
|
||||
*
|
||||
* Default 60 seconds. Max of 2 minutes enforced in Connection.java,
|
||||
* and it also interprets <= 0 as default.
|
||||
* and it also interprets <= 0 as default.
|
||||
*
|
||||
*/
|
||||
public void setConnectTimeout(long ms) {
|
||||
|
||||
@@ -14,8 +14,8 @@ import net.i2p.util.Log;
|
||||
/**
|
||||
* Receive raw information from the I2PSession and turn it into
|
||||
* Packets, if we can.
|
||||
*<p>
|
||||
* I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream
|
||||
*<p>
|
||||
* I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream
|
||||
*/
|
||||
class MessageHandler implements I2PSessionMuxedListener {
|
||||
private final ConnectionManager _manager;
|
||||
|
||||
@@ -16,9 +16,9 @@ import net.i2p.util.Log;
|
||||
/**
|
||||
* Stream that can be given messages out of order
|
||||
* yet present them in order.
|
||||
*<p>
|
||||
* I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream
|
||||
*<p>
|
||||
*<p>
|
||||
* I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream
|
||||
*<p>
|
||||
* This buffers unlimited data via messageReceived() -
|
||||
* limiting / blocking is done in ConnectionPacketHandler.receivePacket().
|
||||
*
|
||||
|
||||
@@ -16,8 +16,8 @@ import net.i2p.util.SimpleTimer2;
|
||||
* A stream that we can shove data into that fires off those bytes
|
||||
* on flush or when the buffer is full. It also blocks according
|
||||
* to the data receiver's needs.
|
||||
*<p>
|
||||
* MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession
|
||||
*<p>
|
||||
* MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession
|
||||
*/
|
||||
class MessageOutputStream extends OutputStream {
|
||||
private final I2PAppContext _context;
|
||||
|
||||
@@ -232,7 +232,7 @@ class Packet {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id if < 0, sets FLAG_NO_ACK
|
||||
* @param id if < 0, sets FLAG_NO_ACK
|
||||
*/
|
||||
public void setAckThrough(long id) {
|
||||
if (id < 0)
|
||||
|
||||
@@ -11,8 +11,8 @@ import net.i2p.util.Log;
|
||||
/**
|
||||
* receive a packet and dispatch it correctly to the connection specified,
|
||||
* the server socket, or queue a reply RST packet.
|
||||
*<p>
|
||||
* I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream
|
||||
*<p>
|
||||
* I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream
|
||||
*/
|
||||
class PacketHandler {
|
||||
private final ConnectionManager _manager;
|
||||
|
||||
@@ -23,8 +23,8 @@ import net.i2p.util.SimpleTimer2;
|
||||
* 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.
|
||||
*<p>
|
||||
* MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession
|
||||
*<p>
|
||||
* MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession
|
||||
*/
|
||||
class PacketQueue implements SendMessageStatusListener, Closeable {
|
||||
private final I2PAppContext _context;
|
||||
|
||||
@@ -21,7 +21,7 @@ import net.i2p.client.streaming.I2PSocketOptions;
|
||||
* null for some methods.
|
||||
*
|
||||
* StandardSockets are always bound, and always start out connected
|
||||
* (unless connectDelay is > 0).
|
||||
* (unless connectDelay is > 0).
|
||||
* You may not create an unbound StandardSocket.
|
||||
* Create this through the SocketManager.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user