Friday, January 13, 2006

Abstract network layer

By now I have almost designed two of the major components in my project. The latest of the 2 is abstract network layer, I call this VNET [Virtual Network]. The server core [httpd core] only knows about the HTTP and send(), recv() like functionality. These functionalities are provided by the VNET interface. Underneath the VNET there exists various drivers for many different protocols [IPV4, IPV6, TIN_CAN and etc]. This insulation has given the httpd to expand and grow with newer technologies without having change to itself. [Code will be available after mid july at sourceforge.net]

Sunday, January 08, 2006

Sun's javax.comm driver has problems

I suspect that Sun's javax.comm driver has other problems in bit stuffing (or related). I found out this by sending an array of bytes including 0xd in it, to another computer over a serial link (NULL modem cable), and the perticular byte (0xd) was recieved as 0xa while all other bytes being transmitted properly just as in the form they were originated at the source. I think this is a bit stuffing problem in the driver provided with Sun's javax.comm.

It is quite noteworthy to mention that this perticular problem can be solved by using rxtxComm, as an alternative to Sun's javax.comm. This is an open source comm API for java, all you have to do is changing the "import javax.comm.*" in to "import gnu.io.*" in your source codes and set CLASSPATH and LD_LIBRARY_PATH accordingly on Unix platforms.