substack/seaport — pull request #5 by chrisjpowers (2012-04-10 01:32:31+00:00)
Title: Subscribing to server events on the client

I added the `subscribe` method on the client/server to enable clients to subscribe to the `allocate`, `assume` and `free` events on the server. I also hacked the client's `on` method to proxy these event handlers to the `subscribe` method for convenience. Tests are included, though I'm not super happy about using `setTimeout` in it (see comments). Any feedback would be appreciated!