Berin Loritsch wrote:
> I used the code from HelloWorld as a starting point. The issue with
> that is that the result
> is automatically returned immediately. I want to make it so that I
> don't time out for a while.
> I have a "keep-alive" as part of my protocol, so that any message that
> is sent updates the last
> time the socket was accessed. I also have a "PING" request that returns
> a "PONG" response so
> that I can ensure the line is alive--or clean up resources for it later.
>
> Unfortunately I don't see any approaches for that.
Ok, the issue is that as of JDK 1.4, you _must_ set the SoTimeout() on the
ServerSocket, or it will timeout too soon.
serverSocket.setSoTimeout( m_timeout );
--
"They that give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety."
- Benjamin Franklin
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>