From ef8c49f135a8b5841a365323c2cac6fddb8b57d2 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 7 Mar 2016 14:35:52 -0800 Subject: [PATCH] ENet JNI API update --- .../src/com/limelight/nvstream/enet/EnetConnection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moonlight-common/src/com/limelight/nvstream/enet/EnetConnection.java b/moonlight-common/src/com/limelight/nvstream/enet/EnetConnection.java index 0cf4f63f..90b91de5 100644 --- a/moonlight-common/src/com/limelight/nvstream/enet/EnetConnection.java +++ b/moonlight-common/src/com/limelight/nvstream/enet/EnetConnection.java @@ -21,7 +21,7 @@ public class EnetConnection implements Closeable { public static EnetConnection connect(String host, int port, int timeout) throws IOException { EnetConnection conn = new EnetConnection(); - conn.enetClient = createClient(); + conn.enetClient = createClient(host); if (conn.enetClient == 0) { throw new IOException("Unable to create ENet client"); } @@ -103,7 +103,7 @@ public class EnetConnection implements Closeable { } private static native int initializeEnet(); - private static native long createClient(); + private static native long createClient(String address); private static native long connectToPeer(long client, String host, int port, int timeout); private static native int readPacket(long client, byte[] data, int length, int timeout); private static native boolean writePacket(long client, long peer, byte[] data, int length, int packetFlags);