summaryrefslogtreecommitdiff
path: root/java/src/com/zerotier
diff options
context:
space:
mode:
authorGrant Limberg <glimberg@gmail.com>2015-05-21 19:34:19 -0700
committerGrant Limberg <glimberg@gmail.com>2015-05-21 19:34:19 -0700
commit1e043a3f66c5ae7d9c1043be3244d605cbaa64fa (patch)
tree0c4825a2486067754b37fb72d73a73eb33b781e4 /java/src/com/zerotier
parentc430d88bd40d178685ac0a2e648d8c4ea675996c (diff)
downloadinfinitytier-1e043a3f66c5ae7d9c1043be3244d605cbaa64fa.tar.gz
infinitytier-1e043a3f66c5ae7d9c1043be3244d605cbaa64fa.zip
Remove link desperation from java API
Diffstat (limited to 'java/src/com/zerotier')
-rw-r--r--java/src/com/zerotier/one/OneService.java5
-rw-r--r--java/src/com/zerotier/sdk/Node.java5
-rw-r--r--java/src/com/zerotier/sdk/PacketSender.java2
3 files changed, 3 insertions, 9 deletions
diff --git a/java/src/com/zerotier/one/OneService.java b/java/src/com/zerotier/one/OneService.java
index 0477b54d..1d3e34c8 100644
--- a/java/src/com/zerotier/one/OneService.java
+++ b/java/src/com/zerotier/one/OneService.java
@@ -75,7 +75,7 @@ public class OneService extends Thread implements Runnable, PacketSender,
{
System.out.println("Got Data From: " + p.getAddress().toString() +":" + p.getPort());
- _node.processWirePacket(System.currentTimeMillis(), new InetSocketAddress(p.getAddress(), p.getPort()), 0, p.getData(), bgtask);
+ _node.processWirePacket(System.currentTimeMillis(), new InetSocketAddress(p.getAddress(), p.getPort()), p.getData(), bgtask);
_nextBackgroundTaskDeadline = bgtask[0];
}
} catch (SocketTimeoutException e) {}
@@ -148,8 +148,7 @@ public class OneService extends Thread implements Runnable, PacketSender,
}
@Override
- public int onSendPacketRequested(InetSocketAddress addr,
- int linkDesperation, byte[] packetData) {
+ public int onSendPacketRequested(InetSocketAddress addr, byte[] packetData) {
System.out.println("onSendPacketRequested to: " + addr.getHostString() +":"+ addr.getPort() + " ");
if(_udpSocket == null)
diff --git a/java/src/com/zerotier/sdk/Node.java b/java/src/com/zerotier/sdk/Node.java
index c7581ca4..34af0d01 100644
--- a/java/src/com/zerotier/sdk/Node.java
+++ b/java/src/com/zerotier/sdk/Node.java
@@ -163,7 +163,6 @@ public class Node {
*
* @param now Current clock in milliseconds
* @param remoteAddress Origin of packet
- * @param linkDesperation Link desperation metric for link or protocol over which packet arrived
* @param packetData Packet data
* @param nextBackgroundTaskDeadline Value/result: set to deadline for next call to processBackgroundTasks()
* @return OK (0) or error code if a fatal error condition has occurred
@@ -171,11 +170,10 @@ public class Node {
public ResultCode processWirePacket(
long now,
InetSocketAddress remoteAddress,
- int linkDesperation,
byte[] packetData,
long[] nextBackgroundTaskDeadline) {
return processWirePacket(
- nodeId, now, remoteAddress, linkDesperation, packetData,
+ nodeId, now, remoteAddress, packetData,
nextBackgroundTaskDeadline);
}
@@ -396,7 +394,6 @@ public class Node {
long nodeId,
long now,
InetSocketAddress remoteAddress,
- int linkDesperation,
byte[] packetData,
long[] nextBackgroundTaskDeadline);
diff --git a/java/src/com/zerotier/sdk/PacketSender.java b/java/src/com/zerotier/sdk/PacketSender.java
index d038b11d..5302f5ce 100644
--- a/java/src/com/zerotier/sdk/PacketSender.java
+++ b/java/src/com/zerotier/sdk/PacketSender.java
@@ -38,12 +38,10 @@ public interface PacketSender {
* delivery. It only means that the packet appears to have been sent.</p>
*
* @param addr {@link InetSocketAddress} to send to
- * @param linkDesperation
* @param packetData data to send
* @return 0 on success, any error code on failure.
*/
public int onSendPacketRequested(
InetSocketAddress addr,
- int linkDesperation,
byte[] packetData);
}