System.Net.WebSockets.WebSocketHttpListenerDuplexStream.HttpListenerAsyncEventArgs.CompletionPortCallback C# (CSharp) Method

CompletionPortCallback() private method

private CompletionPortCallback ( uint errorCode, uint numBytes, NativeOverlapped nativeOverlapped ) : void
errorCode uint
numBytes uint
nativeOverlapped System.Threading.NativeOverlapped
return void
            private unsafe void CompletionPortCallback(uint errorCode, uint numBytes, NativeOverlapped* nativeOverlapped)
            {
                if (errorCode == Interop.HttpApi.ERROR_SUCCESS ||
                    errorCode == Interop.HttpApi.ERROR_HANDLE_EOF)
                {
                    FinishOperationSuccess((int)numBytes, false);
                }
                else
                {
                    FinishOperationFailure(new HttpListenerException((int)errorCode), false);
                }
            }