classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to java/net/PlainSocketImpl.java


From: Stephen Crawley
Subject: Changes to java/net/PlainSocketImpl.java
Date: Wed, 30 Jul 2003 23:31:40 +1000

Hi Torsten,

I don't know if you did this deliberately, but your latest change
to java/net/PlainSocketImpl.java to implement the connect(addr,timeout)
method has clobbered an existing implementation checked in a few
hours earlier by Michael Koch on my behalf.

Your implementation ignores the timeout (with a comment to the effect
that this should be implemented in the future)

The implementation that yours overwrote implement connect timeouts by
setting the SO_TIMEOUT socket option before calling the native connect
method.  

I know that my implementation will not work for older Linux kernel that
do not allow you to change socket timeouts. But recent kernels do ... by
to my reading of the kernel source code. And at least the behaviour in
an older kernel will be to use a default timeout ... which is the same
as what your implementation does!

The alternative approach to implementing the connect timeout would
entail setting an interval timer and catching SIGALRM, etc.  I don't
think we should do this in the Classpath native libs because of the
possibility of interfering with other uses of SIGALRM by the JVM.  

Either way, do you intend to implement connect timeouts?

-- Steve





reply via email to

[Prev in Thread] Current Thread [Next in Thread]