ServerProxy
ServerProxy copied to clipboard
SocketTimeoutException on socket.accept()
Hi, I just tried this library for a media player application. But I get SocketTimeoutException in ServerProxy.java file, at line 115. The code is on that line is very critical: "Socket client = socket.accept();". It is normal because you set socket timeout to 5 seconds. However, my question is why connection is never established (even if I remove timeout, it waits forever)? Did you experience such case?
+1 same problem
You can increase the timeout, but you shouldn't be getting a SocketTimeoutException because it is being handled in the loop: https://github.com/daneren2005/ServerProxy/blob/master/src/github/daneren2005/serverproxy/ServerProxy.java#L126. How are you trying to connect to the ServerProxy after you start it? Are you using getPrivateAddress()
?