Yeah, I can see that.  I didn't want to go fiddling with the buffer API though.  Perhaps an alternate write function, WriteBuffer that we just pass the buffer, but thats another function pointer to setup.