browser methods

var shoe =require('shoe')

var stream = shoe(uri, cb)

Return a readable/writable stream from the sockjs path uri.
uri may be a full uri or just a path.

shoe will emit a 'connect' event when the connection is actually open,
(just like in net).
writes performed before the 'connect' event will be buffered. passing in cb to
shoe is a shortcut for shoe(uri).on('connect', cb)

server methods

var shoe =require('shoe')

All the methods from the sockjs exports objects are attached onto the shoe
function, but the shoe() function itself is special.

var sock = shoe(opts, cb)

Create a server with sockjs.createServer(opts) except this function also adds
the .install() function below.

If cb is specified, it fires cb(stream) on 'connection' events.

sock.install(server, opts)

Call sock.installHandler() with the default option of spamming stdout with log
messages switched off in place of just emitting 'log' messages
on the sock object instead. This is a much less spammy default that gets out
of your way.

If opts is a string, use it as the opts.prefix.

server events

All the messages that sockjs normally emits will be available on the sock
object plus the events below:

sock.on('log', function (severity, msg) { ... })

Using the default logger with sock.install() will cause these 'log' messages
to be emitted instead of spamming stdout.