Hi Casey,
thanks for the quick reply!

Casey Marshall wrote:
>>Should it simply be added?
>>
> 
> 
> Yeah. What the setOption method tries to do now is put "integer" methods
> (those that set an integer or a boolean value) in one method (in
> VMPlainSocketImpl), and to get/set other values with dedicated methods.
> Getting the bind address, for example, has it's own method
> (getLocalAddress).
> 
> This is probably not the best way to do this, though. This favors
> simpler native methods (always passing and returning an integer value is
> a lot easier than dealing with different argument types), but in this
> case I'm not satisfied with it.
Ok. Indeed! I have seen a different implementation in GCJ and the Classpath one
is simpler.

>>The other thing that is used from VMPlainDatagramSocketImpl is the connect()
>>method. Is it possible for DGRAM sockets to just use VMChannel.connect 
>>instead?
>>
> 
> 
> Yes. The original just called the common method _javanet_connect, anyway.
Great. However there is just one little question left:
java.net.SocketImpl.connect() throws IOException while
java.net.DatagramImpl.connect() throws SocketException. I would have to change
all throwings of IOException in VMChannel.connect to SocketExceptions and change
affected signatures accordingly. Is this still ok?

cya
Robert

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to