Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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