* Streaming:

- Set ports on many packets that were missing them
   - Use connection throttling methods on pings too (ticket #1142)
   - Add methods to set ports on pings
   - Argument checking on ping methods
This commit is contained in:
zzz
2014-02-02 16:47:29 +00:00
parent b7207fd29f
commit 3622501471
6 changed files with 130 additions and 26 deletions

View File

@@ -126,12 +126,31 @@ public interface I2PSocketManager {
* Ping the specified peer, returning true if they replied to the ping within
* the timeout specified, false otherwise. This call blocks.
*
* Uses the ports from the default options.
*
* @param peer Destination to ping
* @param timeoutMs timeout in ms
* @param timeoutMs timeout in ms, greater than zero
* @throws IllegalArgumentException
* @return success or failure
*/
public boolean ping(Destination peer, long timeoutMs);
/**
* Ping the specified peer, returning true if they replied to the ping within
* the timeout specified, false otherwise. This call blocks.
*
* Uses the ports specified.
*
* @param peer Destination to ping
* @param localPort 0 - 65535
* @param remotePort 0 - 65535
* @param timeoutMs timeout in ms, greater than zero
* @return success or failure
* @throws IllegalArgumentException
* @since 0.9.12
*/
public boolean ping(Destination peer, int localPort, int remotePort, long timeoutMs);
public String getName();
public void setName(String name);