Skip to content

Commit

Permalink
Merge pull request #1 from gabrielmagno/master
Browse files Browse the repository at this point in the history
  • Loading branch information
ghenry22 authored Jul 14, 2016
2 parents 2c04b6f + 6c50299 commit 90b1bc7
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 90b1bc7

Please sign in to comment.