Browse Source

update PacketSender interface

Grant Limberg 10 years ago
parent
commit
0b9e5928d3
1 changed files with 4 additions and 2 deletions
  1. 4 2
      java/src/com/zerotier/sdk/PacketSender.java

+ 4 - 2
java/src/com/zerotier/sdk/PacketSender.java

@@ -37,11 +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 addr {@link InetSocketAddress} to send to
+     * @param localAddr {@link InetSocketAddress} to send from.  Set to null 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 addr,
+            InetSocketAddress localAddr,
+            InetSocketAddress remoteAddr,
             byte[] packetData);
 }