missing methods in java.net.Socket

Brian Burton brian at burton-computer.com
Wed Jul 15 13:15:43 PDT 1998

java.net.Socket is missing several methods:

      Returns setting for SO_LINGER. 
      Returns setting for SO_TIMEOUT. 

 setSoLinger(boolean, int) 
      Enable/disable SO_LINGER with the specified linger time. 
      Enable/disable SO_TIMEOUT with the specified timeout, in

      Tests if TCP_NODELAY is enabled. 

      Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm). 

I have started to look at implementing them.  They should be trivial
since PlainSocketImpl already has socketSetOption and socketGetOption
methods.  But those methods currently have a comment in them claiming
that the SO_TIMEOUT option will be handled by Java.  Specifically:

	case java_net_SocketOptions_IP_MULTICAST_IF:
	case java_net_SocketOptions_SO_BINDADDR: /* JAVA takes care */
	case java_net_SocketOptions_SO_TIMEOUT: /* JAVA takes care */

That doesn't appear to be the case.  Am I confused?  Should I go ahead
and fix this?  Or is there already a fix for this in the current source
tree?  I am looking at 1.0.b1.

I also noticed that PlainSocketImpl is not declared to implement
SocketOptions.  But in fact it does implement the interface.


Brian Burton                        Custom Software Development
Burton Computer Corporation         Java, C++, Orbix, Tuxedo
http://www.burton-computer.com      OO Consulting and Mentoring

More information about the kaffe mailing list