Update JNI code to reflect new ZeroTier API
This commit is contained in:
parent
0a11dd2d24
commit
d8f1c3dff7
6 changed files with 202 additions and 255 deletions
|
@ -46,13 +46,9 @@ public interface DataStoreGetListener {
|
|||
*
|
||||
* @param name Name of the object in the data store
|
||||
* @param out_buffer buffer to put the object in
|
||||
* @param bufferIndex index in the object to start reading
|
||||
* @param out_objectSize long[1] to be set to the actual size of the object if it exists.
|
||||
* @return the actual number of bytes read.
|
||||
* @return size of the object
|
||||
*/
|
||||
public long onDataStoreGet(
|
||||
String name,
|
||||
byte[] out_buffer,
|
||||
long bufferIndex,
|
||||
long[] out_objectSize);
|
||||
byte[] out_buffer);
|
||||
}
|
||||
|
|
|
@ -37,13 +37,13 @@ public interface PacketSender {
|
|||
* on failure. Note that success does not (of course) guarantee packet
|
||||
* delivery. It only means that the packet appears to have been sent.</p>
|
||||
*
|
||||
* @param localAddr {@link InetSocketAddress} to send from. Set to null if not specified.
|
||||
* @param localSocket socket file descriptor to send from. Set to -1 if not specified.
|
||||
* @param remoteAddr {@link InetSocketAddress} to send to
|
||||
* @param packetData data to send
|
||||
* @return 0 on success, any error code on failure.
|
||||
*/
|
||||
public int onSendPacketRequested(
|
||||
InetSocketAddress localAddr,
|
||||
long localSocket,
|
||||
InetSocketAddress remoteAddr,
|
||||
byte[] packetData,
|
||||
int ttl);
|
||||
|
|
|
@ -26,10 +26,10 @@ public interface PathChecker {
|
|||
* such as network containers or embedded.
|
||||
*
|
||||
* @param ztAddress ZeroTier address or 0 for none/any
|
||||
* @param localAddress Local interface address
|
||||
* @param localSocket Local interface socket. -1 if unspecified
|
||||
* @param remoteAddress remote address
|
||||
*/
|
||||
boolean onPathCheck(long ztAddress, InetSocketAddress localAddress, InetSocketAddress remoteAddress);
|
||||
boolean onPathCheck(long ztAddress, long localSocket, InetSocketAddress remoteAddress);
|
||||
|
||||
/**
|
||||
* Function to get physical addresses for ZeroTier peers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue