Handle the case where the buffer size is less than or zero. This could
be improved depending on some platforms by detecting the amount of data
waiting in the buffer (which also has the potential of improving
performance of the acknowledgement decorator).