Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void ReadFully(byte[] b, int off, int len)
- {
- if(len < 0)
- {
- throw new IndexOutOfRangeException();
- }
- int n = 0;
- while(n < len)
- {
- int count = ClientInput.Read(b, off + n, len - n);
- if(count < 0)
- {
- throw new EndOfStreamException();
- }
- n += count;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement