Ignore:
Timestamp:
Jan 5, 2015 3:09:12 PM (6 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
2e5185aa
Parents:
045f6dc
Message:

Streaming: Add API for sending/receiving payload in ping/pong

File:
1 edited

Legend:

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

    r045f6dc r6e847a4c  
    159159    public boolean ping(Destination peer, int localPort, int remotePort, long timeoutMs);
    160160
     161    /**
     162     * Ping the specified peer, returning true if they replied to the ping within
     163     * the timeout specified, false otherwise.  This call blocks.
     164     *
     165     * Uses the ports specified.
     166     *
     167     * @param peer Destination to ping
     168     * @param localPort 0 - 65535
     169     * @param remotePort 0 - 65535
     170     * @param timeoutMs timeout in ms, greater than zero
     171     * @param payload to include in the ping
     172     * @return the payload received in the pong, zero-length if none, null on failure or timeout
     173     * @throws IllegalArgumentException
     174     * @since 0.9.18
     175     */
     176    public byte[] ping(Destination peer, int localPort, int remotePort, long timeoutMs, byte[] payload);
     177
     178    /**
     179     *  For logging / diagnostics only
     180     */
    161181    public String getName();
     182
     183    /**
     184     *  For logging / diagnostics only
     185     */
    162186    public void setName(String name);
    163187
Note: See TracChangeset for help on using the changeset viewer.