mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-16 14:18:24 +00:00
Remove link desperation from java API
This commit is contained in:
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user