torsdag 8 december 2011

Change the channel, trip the station

GNU Classpath is very Unix-centered. This has some impact on the java-net implementation, since Unix treats kind of everything like a file -- AmigaOS does not. This means that uses VMChannel's read() and write() methods, which calls AmigaOS functions read() and write(). These functions expects the fileDescriptor to point to a file, not a socket. So I have to make some modifications to the VMChannel, adding socket specific read and write methods. Also I have to make sure not to close any sockets using file closing functions.
Given the big difference between a socket and a file in the Amiga world its really tempting to make a completely new VMChannel only for Sockets.