示例#1
0
        static void OnAllocateCallback(IntPtr handle, IntPtr suggestedSize, out uv_buf_t buf)
        {
            var stream = HandleContext.GetTarget <StreamHandle>(handle);

            stream.OnAllocateCallback(out buf);
        }
示例#2
0
        static void OnReadCallback(IntPtr handle, IntPtr nread, ref uv_buf_t buf)
        {
            var stream = HandleContext.GetTarget <StreamHandle>(handle);

            stream.OnReadCallback(ref buf, (int)nread.ToInt64());
        }