Writing a TCP Binary Server in Node.js

I'm looking to write a server in node.js to handle data for an existing client. I can't readily change the client and it has its protocol defined as a binary streaming protocol over TCP (and a little UDP). I know the structure of the messages, however, and each message is prefixed with a 4 byte header: a 2 byte short representing message size and a 2 byte short representing message type.

The messages themselves have a fixed "schema," i.e. if a message type is of type X, it will always have certain fields in it with a maximum size of S.

What I'd like to do is, in node.js, define my protocol up front - I saw that this was possible using packages like node-binary and binary-parser. Then, for each 'data' even on the socket, look at the first 4 bytes, then pass the socket to the appropriate message parser. Is this possible? Or do I need to collect all the buffers myself for each data event until I get to header.Size and then parse that?