ReadBufferRead Method |
Namespace: Lawo.IO
Exception | Condition |
---|---|
InvalidOperationException | The ReadBuffer object was created by calling ReadBuffer(ReadAsyncCallback, Int32). |
After each call to this method, Count contains the number of bytes in the buffer and Index equals 0.
This function is usually called when Index equals Count, that is, when the client has processed all bytes in the buffer (the whole buffer is filled in this case). If it is called earlier (when Index < Count) then the remaining bytes at the end of the buffer are first copied to the start of the buffer and the now empty part of the buffer is filled by calling the callback.