Skip to content

Commit

Permalink
Closes ConnectSDK#70
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Jul 12, 2016
1 parent 2c04b6f commit 6c50299
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/com/connectsdk/discovery/provider/ssdp/SSDPClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class SSDPClient {
public static final String BYEBYE = "ssdp:byebye";
public static final String UPDATE = "ssdp:update";

DatagramSocket datagramSocket;
MulticastSocket datagramSocket;
MulticastSocket multicastSocket;

SocketAddress multicastGroup;
Expand All @@ -67,10 +67,10 @@ public class SSDPClient {
static int MX = 5;

public SSDPClient(InetAddress source) throws IOException {
this(source, new MulticastSocket(PORT), new DatagramSocket(null));
this(source, new MulticastSocket(PORT), new MulticastSocket(null));
}

public SSDPClient(InetAddress source, MulticastSocket mcSocket, DatagramSocket dgSocket) throws IOException {
public SSDPClient(InetAddress source, MulticastSocket mcSocket, MulticastSocket dgSocket) throws IOException {
localInAddress = source;
multicastSocket = mcSocket;
datagramSocket = dgSocket;
Expand All @@ -80,6 +80,7 @@ public SSDPClient(InetAddress source, MulticastSocket mcSocket, DatagramSocket d
multicastSocket.joinGroup(multicastGroup, networkInterface);

datagramSocket.setReuseAddress(true);
datagramSocket.setTimeToLive(4);
datagramSocket.bind(new InetSocketAddress(localInAddress, 0));
}

Expand Down

0 comments on commit 6c50299

Please sign in to comment.