postwait/node-amqp — pull request #127 by majek (2012-09-18 10:39:55+00:00)
Title: Fix #84 - slice outgoing messages according to frameMax

Content frames are ignoring the frame max setting, and just send the entire body as one frame.

This commit does three things:
1) amends `maxFrameBuffer` to the value advertised by the server
2) extracts main logic from `_sendBody` function to a `_bodyToBuffer`
3) `_sendBody` is rewritten in a simpler fashion, assuming it only deals with buffers (non-buffers are being converted to a buffer in `_bodyToBuffer`)

I don't know how to run the tests from `test` directory, I verified this code manually.