J
Jan Jansen
Hello all,
I'm keeping a socket open for a long time (several hours). When
testing on my local lan network everything works, the socket stays
open for several hours.
When i upload the server and connect a client to the server (over the
internet) everything works fine. But when i don't send any data from
client to server in 15-20 minutes the server closes the socket and the
client receives a:
"Connection reset by peer: socket write error"
when trying to write to the socket.
This does not happen when testing on the local lan.
Is there something different about opening and keeping sockets open on
the internet compared to a local network?
I'm using:
s.setKeepAlive(true);
s.setSoTimeout(0);
To keep the sockets open. In theory this should be enough. On local
network this seems to be enough, but not on the internet.
The server and client are standard java programs. Both run on the
latest 1.4 jdk.
For the last couple of days i've been asking myself why the server
closes the socket after 15-20 minutes. Can somebody offer me a helping
hand?
Thanks,
Jan Jansen
I'm keeping a socket open for a long time (several hours). When
testing on my local lan network everything works, the socket stays
open for several hours.
When i upload the server and connect a client to the server (over the
internet) everything works fine. But when i don't send any data from
client to server in 15-20 minutes the server closes the socket and the
client receives a:
"Connection reset by peer: socket write error"
when trying to write to the socket.
This does not happen when testing on the local lan.
Is there something different about opening and keeping sockets open on
the internet compared to a local network?
I'm using:
s.setKeepAlive(true);
s.setSoTimeout(0);
To keep the sockets open. In theory this should be enough. On local
network this seems to be enough, but not on the internet.
The server and client are standard java programs. Both run on the
latest 1.4 jdk.
For the last couple of days i've been asking myself why the server
closes the socket after 15-20 minutes. Can somebody offer me a helping
hand?
Thanks,
Jan Jansen