Skip to content

Commit

Permalink
Use ref for stream event in System.Net.Quic (#32086)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotalik authored Feb 11, 2020
1 parent 7fa8ea8 commit c0a61a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ internal struct SOCKADDR_INET
internal delegate uint StreamCallbackDelegate(
IntPtr stream,
IntPtr context,
StreamEvent streamEvent);
ref StreamEvent streamEvent);

internal delegate uint StreamOpenDelegate(
IntPtr connection,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,14 +487,14 @@ private void EnableReceive()
}

internal static uint NativeCallbackHandler(
IntPtr stream,
IntPtr context,
StreamEvent connectionEventStruct)
IntPtr stream,
IntPtr context,
ref StreamEvent streamEvent)
{
var handle = GCHandle.FromIntPtr(context);
var quicStream = (MsQuicStream)handle.Target;

return quicStream.HandleEvent(ref connectionEventStruct);
return quicStream.HandleEvent(ref streamEvent);
}

private uint HandleEvent(ref StreamEvent evt)
Expand Down

0 comments on commit c0a61a7

Please sign in to comment.