einaros/sse.js — pull request #4 by scttnlsn (2012-10-05 20:55:52+00:00)
Title: Expose SSEClient

I need to be able to create an SSEClient in the actual request handlers so I can retrieve info from the `req`, etc. For example:

```javascript
var SSE = require('sse');
var express = require('express');

var app = express();

app.get('/events/:id', function(req, res) {
findById(req.params.id, function(err, obj) {
if (err) ...;

var client = new SSE.Client(req, res);
client.initialize();

obj.on('foo', function(foo) {
client.send(foo, 'foo');
});

...
});
});
```