Network idle timeout Exception in ServerSocket | Thales IoT Developer Community
February 4, 2016 - 9:28pm, 2520 views
I am using a server socket in my java program and i have a issue.
I open the server connection:
ServerSocketConnection ssc = (ServerSocketConnection) Connector.open("socket://:1234;bearer_type=gprs;access_point=" + prg.getGprsAPN() + ";dns=188.8.131.52;username=" + prg.getGprsUser() + ";password=" + prg.getGprsPassword());
Also I tried with the parameter ;timeout=20; I dont sure about the unit, ms or s, so I tried with many differentes values.
IOException idle timeout is thrown after two minutes waitting in acceptAndOpen method.
SocketConnection sc = (SocketConnection) ssc.acceptAndOpen();
I recieve connections before this time, this is ok, but if there is not connections in these minutes the exception is thrown and i have to close and open the serverconnecion and wait again in acceptAndOpen method.
why idle time out exception is thrown?