oortcloud/node-ddp-client — pull request #9 by AjayMT (2013-03-16 09:00:03+00:00)
Title: Fix a connection bug, update README and example.

I tried using the DDP client with the following code, and nothing happened.

var DDPClient = require('ddp');
var client = new DDPClient({ host: 'localhost', port:3000 });
client.connect(function () {
console.log('connected');
});

I tried using `client.on()`, but it gave me an error saying that `client` has no attribute `on`. So I inspected the source code for a while, and then decided to try using `client.socket.on()`. The issue was that the server requires the client to specify the version of DDP that it is speaking. So now, the client specifies the version of DDP that it speaks (`pre1` for now) and the versions of DDP it supports (`['pre1']` for now), and establishes a connection.