AK.F1.Timing.Live.IO.LiveSocketMessageStream.FillCore C# (CSharp) Method

FillCore() private method

private FillCore ( byte buffer, int offset, int count ) : bool
buffer byte
offset int
count int
return bool
        private bool FillCore(byte[] buffer, int offset, int count)
        {
            int available;

            while(count > 0)
            {
                if((available = Math.Min(_length - _position, count)) > 0)
                {
                    Buffer.BlockCopy(_buffer, _position, buffer, offset, available);
                    _position += available;
                    offset += available;
                    count -= available;
                }
                else
                {
                    FillBuffer();
                }
            }

            return true;
        }