adobe/brackets-shell — pull request #406 by iwehrman (2013-12-30 23:37:36+00:00)
Title: Send binary Brackets-Node command responses 

This pull request updates the Brackets-Node `ConnectionManager` so that it can send binary responses to commands in Node domains without additional encoding.

When a command responds with an object that is an instance of a Node `Buffer`, the `ConnectionManager` assumes that the response should be sent via the WebSocket using a binary message. To do so, it encodes the (32-bit unsigned integer) command ID as a four-byte header, which is prepended to the command's result Buffer as the final response message.

For now, the only binary messages that can be sent are of type `"commandResponse"`.

This should be reviewed in tandem with a companion brackets pull request, which updates `NodeConnection` to receive these binary command responses.