förbind
What is förbind?
förbind connects your users so they can communicate in real-time. Your app may be a game like Chess, or a chat room, or a collaborative application - förbind gives you a way to connect your users and control the message flow.
You set up an application, and users connect to sessions. Within the session a user can send a message, and förbind will distribute it to the other users in the session. Don't worry, we'll be adding more detail soon!
How does it work & a demo?
Silently behind the scenes, förbind is using the latest Web Sockets API and degrading to Flash thanks to socket.io and our server platform is running on node.js.
If you want an idea of what förbind looks like when it's working, check out this early demo of förbind in JS Bin.
Show me some code
If you creating a chat room for your application, the code would look like this:
forbind.join();
// when we've joined the room, say hello
forbind.on('join', function () {
forbind.send({
username: 'Remy',
message: 'Hello everyone!'
});
});
// when a message comes in show it on the screen
forbind.on('message', function (data) {
alert(data.username + ' says: ' + data.message);
});