private void CompleteIOCPOperation()
{
// TODO #4900: Optimization to remove callbacks if the operations are completed synchronously:
// Use SetFileCompletionNotificationModes(FILE_SKIP_COMPLETION_PORT_ON_SUCCESS).
// If SetFileCompletionNotificationModes(FILE_SKIP_COMPLETION_PORT_ON_SUCCESS) is not set on this handle
// it is guaranteed that the IOCP operation will be completed in the callback even if Socket.Success was
// returned by the Win32 API.
// Required to allow another IOCP operation for the same handle. We release the native overlapped
// in the safe handle, but keep the safe handle object around so as to be able to reuse it
// for other operations.
_ptrNativeOverlapped?.FreeNativeOverlapped();
}