Rework isccc_ccmsg to support multiple messages per tcp read
The current implementation of rndc assumes a tcp read to contain exactly one message. This can fail in a number of cases:
- A message exceeds the tcp read size and is split into multiple messages
- Multiple messages are part of a single read
Both cases result in the some of the messages getting dropped or the connection being closed because of a protocol error. This commit changes the rndc reader to have a working buffer where the full message is reassembled before invoking the callback. If there is already a valid message in the buffer when rndc attempts to read a message it is returned from the buffer without ever requesting a tcp read. This ensures low memory usage inside bind and allows for the OS to properly signal the sender to slow down if bind can't keep up.
closes #4416 (closed)
Edited by Dominik Thalhammer