Microsoft.AspNet.Server.Kestrel.Networking.UvStreamHandle.UvAllocCb C# (CSharp) Method

UvAllocCb() private static method

private static UvAllocCb ( IntPtr handle, int suggested_size, Libuv &buf ) : void
handle System.IntPtr
suggested_size int
buf Libuv
return void
        private static void UvAllocCb(IntPtr handle, int suggested_size, out Libuv.uv_buf_t buf)
        {
            var stream = FromIntPtr<UvStreamHandle>(handle);
            try
            {
                buf = stream._allocCallback(stream, suggested_size, stream._readState);
            }
            catch (Exception ex)
            {
                stream._log.LogError("UvAllocCb", ex);
                buf = stream.Libuv.buf_init(IntPtr.Zero, 0);
                throw;
            }
        }