Exemple #1
0
 public void Read(int fd, byte[] buffer, long offset, long length, Action <int, byte[], int> callback)
 {
     Libeio.read(fd, buffer, offset, length, (arg1, arg2, arg3) => {
         outstanding.Enqueue(() => callback(arg1, arg2, arg3));
         pulse.Send();
     });
 }
Exemple #2
0
        void ReadNextBuffer()
        {
            if (!readEnabled)
            {
                return;
            }

            var length = (int)Math.Min(readBuffer.Length, readLimit);

            Libeio.read(Handle.ToInt32(), readBuffer, position, length, OnReadDone);
        }