2013-10-06

Build a web chat app with icomet

Views: 12089 | Add Comments

icomet(https://github.com/ideawu/icomet) is HTTP a server-push comet solution, it supports all popular browsers and OSes, including Safari/iOS(iPhone, iPad, iPod), Safari/Mac, IE/Windows, Chrome, Firefox/Mac, Windows.

icomet is written in C++, built with libevent, and is totally open sourced.

Building a web chat with icomet is very easy, the provided JavaScript client library is easy to use:

var comet = new iComet({
    channel: 'abc',
    signUrl: 'http://127.0.0.1:8000/sign',
    subUrl: 'http://127.0.0.1:8100/sub',
    callback: function(msg){
        // on server push
        alert(msg.content);
    }
});

You can see the Live Demo here: http://www.ideawu.com/icomet/chat.html

Posted by ideawu at 2013-10-06 14:41:02 Tags: , ,

Leave a Comment