static void OnAllocateCallback(IntPtr handle, IntPtr suggestedSize, out uv_buf_t buf) { var stream = HandleContext.GetTarget <StreamHandle>(handle); stream.OnAllocateCallback(out buf); }
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()); }