Thursday, February 26, 2009

Moving towards w3c standards

For various events handling I have decided to move towards W3C standard event handling.
I have refactored the current APIs of socket and libxml_saxparser to be using various standard event APIs. (addEventListener(), removeEventListener())

Friday, February 20, 2009

"Hello World!" on sockets............

I have implemented the basic APIs for Socket calls and reading/writing data to and from the socket. Currently we are supporting the non-blocking and multi-threaded implementation of Sockets.

We can connect to any host at any port and send the data through the socket.

When we connects is called over the Socket, we start a background thread which continuously polls the Socket for any incoming data. Whenever any data is available, it reads the data and sends it across to the appropriate DataHandler.

the encryption and gzipping the data is currently next in the pipeline.

Friday, February 13, 2009

c++ to JavaScript calls working..

I found out how to get the JavaScript functions as a parameter to my callback function and call those functions from my C++ code.
I can pass a function like this.
mcrux.callMyJSFunction(function() {
alert( "my anonymous world!!");
});

and the passed function can be called by the backend Code :)
This will be a great step towards having callbacks registered for any of the event.