Hi guys I have a multicast socket that is receiving packets and is working fine.
I had an issue though where when my computer wakes up from sleep the multicast socket does not work. Continually timing out:
MulticastSocket socket;
\\initialise socket..
while (running) {
try {
synchronized (syncRoot) {
socket.setSoTimeout(WAIT_TIME);
socket.receive(recv);
//Do Something...
}
} catch (SocketTimeoutException e) {
}
Currently when my computer wakes up from windows sleep mode it continually throws a socket exception when I no their are packets being sent. I have checked variables socket.isBound(), socket.isClosed(), socket.isConnected() and they have not changed from when it was working. Am I missing a variable? Even when the socket is working it returns isConnected() = false, isBound() = true, isClosed() = false.
Do I need to do something like count the number of SocketTimeoutExceptions if i get 10 then reinitialise my multicast socket?