summaryrefslogtreecommitdiff
path: root/same-android/src/main/java/com/orbekk/discovery/Broadcaster.java
diff options
context:
space:
mode:
Diffstat (limited to 'same-android/src/main/java/com/orbekk/discovery/Broadcaster.java')
-rw-r--r--same-android/src/main/java/com/orbekk/discovery/Broadcaster.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/same-android/src/main/java/com/orbekk/discovery/Broadcaster.java b/same-android/src/main/java/com/orbekk/discovery/Broadcaster.java
index 167eda1..6744651 100644
--- a/same-android/src/main/java/com/orbekk/discovery/Broadcaster.java
+++ b/same-android/src/main/java/com/orbekk/discovery/Broadcaster.java
@@ -51,11 +51,11 @@ public class Broadcaster {
return fromInt(broadcast);
}
- public synchronized boolean sendBroadcast(byte[] data, int port) {
+ public synchronized boolean sendUdpData(byte[] data, InetAddress ip, int port) {
try {
socket = new DatagramSocket(0);
socket.setBroadcast(true);
- DatagramPacket packet = new DatagramPacket(data, data.length, getBroadcastAddress(), port);
+ DatagramPacket packet = new DatagramPacket(data, data.length, ip, port);
socket.send(packet);
return true;
} catch (SocketException e) {