This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: java.net: Classpath vs. libgcj Comparison


Bryce McKinlay <bryce@albatross.co.nz> writes:

> When I was looking at this a while ago I came to the conclusion
> that we do in fact need to have seperate outputstream code for Files and
> Sockets, at least at some level. The problem of File descriptors not
> being a portable way to represent sockets seems to add weight to this.

They don't have to be, and were not intended to be.  Having the
SocketImplFactory and SocketImpl framework were designed to handle
different SocketImpl sub-classes.  For Windows, we need to define a
WindowsSocketImpl class, and install things so that creating a socket
returns a WindowsSocketImpl rather than a PlainSocketImpl.  It might
make sense to rename the latter to UnixSocketImpl or something, but I
see no reason why the existing class can't continue to use
FileDescriptor (except perhaps the timeout issue someone mentioned).
We should probably also create and installed an explicit
UnixSocketImplFactory rather than having that be implicit.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]