[patch #3] java.net stuff

Warren Levy warrenl@cygnus.com
Thu May 27 02:47:00 GMT 1999


On Thu, 22 Apr 1999, Bryce McKinlay wrote:

> Here's a patch for java.net that implements some of the socket options
> methods which are often use by server-type applications.

Bryce, we got your cleanroom/copyright assignment paperwork in the
snailmail today.  Thanks and congratulations on being gcj's first 
officially documented net contributor!

I took a look at the java.net patches today for the first time (due to 
cleanroom) and noticed that things had changed a bit since you had 
submitted them.  I did fold in all applicable changes to what I had been 
working on and took the opportunity to check in both sets of our mods to 
the sourceware cvs repository today.

> In addition, I have implemented the set/getSoTimeout() methods in
> Socket.java and ServerSocket.java. However, this option is not
> implemented in the native code, and will currently throw an exception.
> Actually, it might be better to implement socket timeouts in libgcj
> itself rather than trying to set parameters in the TCP stack to do it,
> because apparantly the timeouts don't work on most platforms (they
> certainly didnt work for me). Kaffe appears to implement timeouts
> itself.

I was just starting to address this yesterday.  There's basically 3 ways
to go:  alarm, select or TCP.  Besides the issue you mentioned, even if 
timeouts can be handled via the TCP stack, the Java doc says that 
SO_TIMEOUT should affect ServerSocket.accept() and from what I've read
this isn't the case for timeouts via the TCP stack.

Since alarms are problematic, I guess that leaves select.
--warrenl


More information about the Java mailing list