I have a scenario in which the web page initially served by HTTP. Upon clicking the submit it will send some data to the server and do few web services which will take long duration. I need to show the response page quickly and after the web service job complete then have to show the result in the same page previously loaded.

Will this possible by processing all the request by http handler and then pass the result by socket io.

I hope to write code some thing similar.

```
var httpd = require('http').createServer(handler);
var io = require('socket.io').listen(httpd);
var fs = require('fs');
httpd.listen(4000);
function handler(req, res) {
    fs.readFile(__dirname + '/index.html',
        function(err, data) {
            if (err) {
                res.writeHead(500);
                return res.end('Error loading index.html');
            }
            res.writeHead(200);

            res.end(data);
        }
        );

}
io.sockets.on('connection', function (socket) {
    socket.on('clientMessage', function(content) {
       setTimeout(function () {
           socket.emit('serverMessage', "web service complete");
       }, 5000);

    });
});

```