Changeset fb74f41


Ignore:
Timestamp:
Jan 27, 2017 1:41:06 AM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
bd1354f
Parents:
5db89d8
Message:

javadoc fixes part 9 (ticket #1894)

Files:
19 edited

Legend:

Unmodified
Added
Removed
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketAddress.java

    r5db89d8 rfb74f41  
    2727     *  May take several seconds for b32.
    2828     *  @param host hostname or b64 dest or b32, may have :port appended
    29      *  @throws IllegalArgumentException for port < 0 or port > 65535 or invalid port
     29     *  @throws IllegalArgumentException for port &lt; 0 or port &gt; 65535 or invalid port
    3030     *  @since 0.9.9
    3131     */
     
    5252    /**
    5353     *  Does not do a reverse lookup. Host will be null.
    54      *  @throws IllegalArgumentException for port < 0 or port > 65535
     54     *  @throws IllegalArgumentException for port &lt; 0 or port &gt; 65535
    5555     */
    5656    public I2PSocketAddress(Destination dest, int port) {
     
    6767     *  Does a naming service lookup to resolve the dest.
    6868     *  May take several seconds for b32.
    69      *  @throws IllegalArgumentException for port < 0 or port > 65535
     69     *  @throws IllegalArgumentException for port &lt; 0 or port &gt; 65535
    7070     */
    7171    public I2PSocketAddress(String host, int port) {
     
    7878
    7979    /**
    80      *  @throws IllegalArgumentException for port < 0 or port > 65535
     80     *  @throws IllegalArgumentException for port &lt; 0 or port &gt; 65535
    8181     */
    8282    public static I2PSocketAddress createUnresolved(String host, int port) {
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketException.java

    r5db89d8 rfb74f41  
    3333     *  Standard codes from streaming are 512-767, defined here.
    3434     *
    35      *  @param status >= 0 from MessageStatusMessage or SendMessageStatusListener
     35     *  @param status &gt;= 0 from MessageStatusMessage or SendMessageStatusListener
    3636     */
    3737    public I2PSocketException(int status) {
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManager.java

    r5db89d8 rfb74f41  
    241241     *  Like connect() but returns a real Socket, and throws only IOE,
    242242     *  for easier porting of apps.
    243      *  @param timeout ms if > 0, forces blocking (disables connectDelay)
     243     *  @param timeout ms if &gt; 0, forces blocking (disables connectDelay)
    244244     *  @since 0.8.4
    245245     */
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerFactory.java

    r5db89d8 rfb74f41  
    8181     *
    8282     * @param host I2CP host null to use default, ignored if in router context
    83      * @param port I2CP port <= 0 to use default, ignored if in router context
     83     * @param port I2CP port &lt;= 0 to use default, ignored if in router context
    8484     * @return the newly created socket manager, or null if there were errors
    8585     */
     
    9696     *
    9797     * @param i2cpHost I2CP host null to use default, ignored if in router context
    98      * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context
     98     * @param i2cpPort I2CP port &lt;= 0 to use default, ignored if in router context
    9999     * @param opts Streaming and I2CP options, may be null
    100100     * @return the newly created socket manager, or null if there were errors
     
    158158     *                           or null for a transient destination. Caller must close.
    159159     * @param i2cpHost I2CP host null to use default, ignored if in router context
    160      * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context
     160     * @param i2cpPort I2CP port &lt;= 0 to use default, ignored if in router context
    161161     * @param opts Streaming and I2CP options, may be null
    162162     * @return the newly created socket manager, or null if there were errors
     
    185185     *                           or null for a transient destination. Caller must close.
    186186     * @param i2cpHost I2CP host null to use default, ignored if in router context
    187      * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context
     187     * @param i2cpPort I2CP port &lt;= 0 to use default, ignored if in router context
    188188     * @param opts Streaming and I2CP options, may be null
    189189     * @return the newly created socket manager, non-null (throws on error)
     
    217217     *                           non-null. Caller must close.
    218218     * @param i2cpHost I2CP host null to use default, ignored if in router context
    219      * @param i2cpPort I2CP port <= 0 to use default, ignored if in router context
     219     * @param i2cpPort I2CP port &lt;= 0 to use default, ignored if in router context
    220220     * @param opts Streaming and I2CP options, may be null
    221221     * @param connect true to connect (blocking)
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptions.java

    r5db89d8 rfb74f41  
    1919     *
    2020     * Default 60 seconds. Max of 2 minutes enforced in Connection.java,
    21      * and it also interprets <= 0 as default.
     21     * and it also interprets &lt;= 0 as default.
    2222     *
    2323     * @return milliseconds to wait, or -1 if we will wait indefinitely
     
    2929     *
    3030     * Default 60 seconds. Max of 2 minutes enforced in Connection.java,
    31      * and it also interprets <= 0 as default.
     31     * and it also interprets &lt;= 0 as default.
    3232     *
    3333     * @param ms timeout in ms
  • apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java

    r5db89d8 rfb74f41  
    178178     * @param timeoutMs 0 or negative means wait forever, 5 minutes max
    179179     * @return true if the packet should be sent, false for a fatal error
    180      *         will return false after 5 minutes even if timeoutMs is <= 0.
     180     *         will return false after 5 minutes even if timeoutMs is &lt;= 0.
    181181     */
    182182    public boolean packetSendChoke(long timeoutMs) throws IOException, InterruptedException {
     
    636636     *  Always true at the start, even if we haven't gotten a reply on an
    637637     *  outbound connection. Only set to false on disconnect.
    638      *  For outbound, use getHighestAckedThrough() >= 0 also,
     638     *  For outbound, use getHighestAckedThrough() &gt;= 0 also,
    639639     *  to determine if the connection is up.
    640640     *
     
    962962
    963963    /**
    964      *  If the next send time is currently >= 0 (i.e. not "never"),
     964     *  If the next send time is currently &gt;= 0 (i.e. not "never"),
    965965     *  this may make the next time sooner but will not make it later.
    966      *  If the next send time is currently < 0 (i.e. "never"),
     966     *  If the next send time is currently &lt; 0 (i.e. "never"),
    967967     *  this will set it to the time specified, but not later than
    968968     *  options.getSendAckDelay() from now (1000 ms)
     
    13291329         * to prevent duplicates in the timer queue.
    13301330         *
    1331          * don't synchronize this, deadlock with ackPackets->ackReceived->SimpleTimer2.cancel
     1331         * don't synchronize this, deadlock with ackPackets-&gt;ackReceived-&gt;SimpleTimer2.cancel
    13321332         *
    13331333         * @return true if the packet was sent, false if it was not
  • apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionDataReceiver.java

    r5db89d8 rfb74f41  
    1212 * is the only one that builds useful outbound Packet objects.
    1313 *<p>
    14  * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession
     14 * MessageOutputStream -&gt; ConnectionDataReceiver -&gt; Connection -&gt; PacketQueue -&gt; I2PSession
    1515 *<p>
    1616 * There's one of these per MessageOutputStream.
     
    3737     * It won't flush if this returns true.
    3838     *
    39      * It was: return con.getUnackedPacketsSent() > 0 (i.e. Nagle)
     39     * It was: return con.getUnackedPacketsSent() &gt; 0 (i.e. Nagle)
    4040     * But then, for data that fills more than one packet, the last part of
    4141     * the data isn't sent until all the previous packets are acked. Which is very slow.
  • apps/streaming/java/src/net/i2p/client/streaming/impl/ConnectionPacketHandler.java

    r5db89d8 rfb74f41  
    1414 * queue, marking packets as acked, updating various fields, etc.
    1515 *<p>
    16  * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream
     16 * I2PSession -&gt; MessageHandler -&gt; PacketHandler -&gt; ConnectionPacketHandler -&gt; MessageInputStream
    1717 *<p>
    1818 * One of these is instantiated per-Destination
  • apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketManagerFull.java

    r5db89d8 rfb74f41  
    633633     *  Like connect() but returns a real Socket, and throws only IOE,
    634634     *  for easier porting of apps.
    635      *  @param timeout ms if > 0, forces blocking (disables connectDelay)
     635     *  @param timeout ms if &gt; 0, forces blocking (disables connectDelay)
    636636     *  @since 0.8.4
    637637     */
  • apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketOptionsImpl.java

    r5db89d8 rfb74f41  
    123123     *
    124124     * Default 60 seconds. Max of 2 minutes enforced in Connection.java,
    125      * and it also interprets <= 0 as default.
     125     * and it also interprets &lt;= 0 as default.
    126126     *
    127127     * @return milliseconds to wait, or -1 if we will wait indefinitely
     
    135135     *
    136136     * Default 60 seconds. Max of 2 minutes enforced in Connection.java,
    137      * and it also interprets <= 0 as default.
     137     * and it also interprets &lt;= 0 as default.
    138138     *
    139139     */
  • apps/streaming/java/src/net/i2p/client/streaming/impl/MessageHandler.java

    r5db89d8 rfb74f41  
    1515 * Receive raw information from the I2PSession and turn it into
    1616 * Packets, if we can.
    17  *<p>
    18  * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream
     17 *&lt;p&gt;
     18 * I2PSession -&gt; MessageHandler -&gt; PacketHandler -&gt; ConnectionPacketHandler -&gt; MessageInputStream
    1919 */
    2020class MessageHandler implements I2PSessionMuxedListener {
  • apps/streaming/java/src/net/i2p/client/streaming/impl/MessageInputStream.java

    r5db89d8 rfb74f41  
    1717 * Stream that can be given messages out of order
    1818 * yet present them in order.
    19  *<p>
    20  * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream
    21  *<p>
     19 *&lt;p&gt;
     20 * I2PSession -&gt; MessageHandler -&gt; PacketHandler -&gt; ConnectionPacketHandler -&gt; MessageInputStream
     21 *&lt;p&gt;
    2222 * This buffers unlimited data via messageReceived() -
    2323 * limiting / blocking is done in ConnectionPacketHandler.receivePacket().
  • apps/streaming/java/src/net/i2p/client/streaming/impl/MessageOutputStream.java

    r5db89d8 rfb74f41  
    1717 * on flush or when the buffer is full.  It also blocks according
    1818 * to the data receiver's needs.
    19  *<p>
    20  * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession
     19 *&lt;p&gt;
     20 * MessageOutputStream -&gt; ConnectionDataReceiver -&gt; Connection -&gt; PacketQueue -&gt; I2PSession
    2121 */
    2222class MessageOutputStream extends OutputStream {
  • apps/streaming/java/src/net/i2p/client/streaming/impl/Packet.java

    r5db89d8 rfb74f41  
    233233
    234234    /**
    235      * @param id if < 0, sets FLAG_NO_ACK
     235     * @param id if &lt; 0, sets FLAG_NO_ACK
    236236     */
    237237    public void setAckThrough(long id) {
  • apps/streaming/java/src/net/i2p/client/streaming/impl/PacketHandler.java

    r5db89d8 rfb74f41  
    1212 * receive a packet and dispatch it correctly to the connection specified,
    1313 * the server socket, or queue a reply RST packet.
    14  *<p>
    15  * I2PSession -> MessageHandler -> PacketHandler -> ConnectionPacketHandler -> MessageInputStream
     14 *&lt;p&gt;
     15 * I2PSession -&gt; MessageHandler -&gt; PacketHandler -&gt; ConnectionPacketHandler -&gt; MessageInputStream
    1616 */
    1717class PacketHandler {
  • apps/streaming/java/src/net/i2p/client/streaming/impl/PacketQueue.java

    r5db89d8 rfb74f41  
    2424 * send them immediately with no blocking, since the
    2525 * mode=bestEffort doesnt block in the SDK.
    26  *<p>
    27  * MessageOutputStream -> ConnectionDataReceiver -> Connection -> PacketQueue -> I2PSession
     26 *&lt;p&gt;
     27 * MessageOutputStream -&gt; ConnectionDataReceiver -&gt; Connection -&gt; PacketQueue -&gt; I2PSession
    2828 */
    2929class PacketQueue implements SendMessageStatusListener, Closeable {
  • apps/streaming/java/src/net/i2p/client/streaming/impl/StandardSocket.java

    r5db89d8 rfb74f41  
    2222 *
    2323 * StandardSockets are always bound, and always start out connected
    24  * (unless connectDelay is > 0).
     24 * (unless connectDelay is &gt; 0).
    2525 * You may not create an unbound StandardSocket.
    2626 * Create this through the SocketManager.
  • router/java/src/net/i2p/router/util/DecayingHashSet.java

    r5db89d8 rfb74f41  
    4444 * for almost all bandwidth classes.
    4545 *
    46  * This has a strictly zero false positive rate for <= 8 byte keys.
     46 * This has a strictly zero false positive rate for &lt;= 8 byte keys.
    4747 * For larger keys, it is 1 / (2**64) ~= 5E-20, which is better than
    4848 * DBF for any entry count greater than about 14K.
     
    209209   
    210210    /**
    211      *  This saves the data as-is if the length is <= 8 bytes,
     211     *  This saves the data as-is if the length is &lt;= 8 bytes,
    212212     *  otherwise it stores an 8-byte hash.
    213213     *  Hash function is from DataHelper, modded to get
  • router/java/src/org/xlattice/crypto/filters/KeySelector.java

    r5db89d8 rfb74f41  
    6262     * The max for 32-byte keys is m=23 and k=11.
    6363     * The precise restriction appears to be:
    64      * ((5k + (k-1)(m-5)) / 8) + 2 < keySizeInBytes
     64     * ((5k + (k-1)(m-5)) / 8) + 2 &lt; keySizeInBytes
    6565     *
    6666     * It isn't clear how to fix this.
Note: See TracChangeset for help on using the changeset viewer.