internal static void WebSocketCompleteAction(WebSocketBase webSocket,
IntPtr actionContext,
int bytesTransferred)
{
Debug.Assert(webSocket != null,
"'webSocket' MUST NOT be NULL or INVALID.");
Debug.Assert(webSocket.SessionHandle != null && !webSocket.SessionHandle.IsInvalid,
"'webSocket.SessionHandle' MUST NOT be NULL or INVALID.");
Debug.Assert(actionContext != IntPtr.Zero, "'actionContext' MUST NOT be IntPtr.Zero.");
Debug.Assert(bytesTransferred >= 0, "'bytesTransferred' MUST NOT be negative.");
if (webSocket.SessionHandle.IsClosed)
{
return;
}
try
{
Interop.WebSocket.WebSocketCompleteAction(webSocket.SessionHandle, actionContext, (uint)bytesTransferred);
}
catch (ObjectDisposedException)
{
}
}