[ http://issues.apache.org/jira/browse/HARMONY-27?page=all ]
Paulex Yang updated HARMONY-27: ------------------------------- Attachment: OSNetworkSystem.h OSNetworkSystem.c OSNetworkSystemWin32.c Following the JNI interfaces I attached before, here goes the native implementations. The OSNetworkSystem.h is the JNI header file generated by javah, and OSNetworkSystem.c is portable implementation, OSNetworkSystemWin32.c is the complement of OSNetworkSystem.c, which are win32 platform dependent. Most (I guess 90%) of these methods are refactored from the original socket native codes located in luni component, including simpl.c, psimpl2.c, pssimpl.c, pmsimpl.c and pdsimpl.c (and for sure, these files can be replaced if relevant Java files are done), the modification to these methods only limited to change name to Java_java_net_***Socket_*** to Java_com_ibm_platform_OSNetworkSytem_***, etc. Others are added to meet channels' needs. Those methods in OSNetworkSystem.c depend heavily on the port library, so that they should be compiled on different platform easiy without change, I've tested on RedHat 9 and Win32. Further more, the two methods in OSNetworkSystemWin32.c are platform specific just because there are some pitfalls in port library:), hope we can get around it later. There are still some TODOs left to use these files 1. Java codes 2. Some minor changes to other native files, i.e., the method declarations within original sockect.c should be moved to socket.h 3. The JCL_CACHE_GET/SET macros using is not refactor yet, and temporarily I work around it by using reflection directly, and the nethelp.c needs some straightforward modification to add these reflection helper methods. I will attach a patch later to refactor the caching mechanism and avoid performance regression. > The network related channels in java.nio.channels are not implemented > --------------------------------------------------------------------- > > Key: HARMONY-27 > URL: http://issues.apache.org/jira/browse/HARMONY-27 > Project: Harmony > Type: Bug > Components: Classlib > Reporter: Paulex Yang > Assignee: Tim Ellison > Attachments: FileDescriptorHandler.java, INetworkSystem.java, Nio-net > Refactoring.jpg, OSNetworkSystem.c, OSNetworkSystem.h, OSNetworkSystem.java, > OSNetworkSystemWin32.c, java.net.JPG > > The following classes defined by Java Spec 5.0 in java.nio.channels are not > included in the class library code > public abstarct class java.nio.channels.DatagramChannel > public abstract class java.nio.channels.ServerSocketChannel > public abstract class java.nio.channels.SocketChannel -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira