2 instantiations of NativeSafeHandle
Microsoft.AspNetCore.Server.IIS (2)
Core\IISHttpServer.cs (1)
162var safehandle = new NativeSafeHandle(pInProcessHandler);
WebHostBuilderIISExtensions.cs (1)
37services.AddSingleton(new IISNativeApplication(new NativeSafeHandle(iisConfigData.pNativeApplication)));
80 references to NativeSafeHandle
Microsoft.AspNetCore.Server.IIS (80)
Core\IISHttpContext.cs (2)
35protected readonly NativeSafeHandle _requestNativeHandle; 77NativeSafeHandle pInProcessHandler,
Core\IISHttpContextOfT.cs (1)
18public IISHttpContextOfT(MemoryPool<byte> memoryPool, IHttpApplication<TContext> application, NativeSafeHandle pInProcessHandler, IISServerOptions options, IISHttpServer server, ILogger logger, bool useLatin1)
Core\IISHttpServer.cs (4)
41public bool IsWebSocketAvailable(NativeSafeHandle pInProcessHandler) 162var safehandle = new NativeSafeHandle(pInProcessHandler); 295public IISHttpContext CreateHttpContext(NativeSafeHandle pInProcessHandler) 305IISHttpContext CreateHttpContext(NativeSafeHandle pInProcessHandler);
Core\IISNativeApplication.cs (2)
8private readonly NativeSafeHandle _nativeApplication; 11public IISNativeApplication(NativeSafeHandle nativeApplication)
Core\IO\AsyncIOEngine.cs (2)
14private readonly NativeSafeHandle _handler; 25public AsyncIOEngine(IISHttpContext context, NativeSafeHandle handler)
Core\IO\AsyncIOEngine.Flush.cs (2)
14private NativeSafeHandle? _requestHandler; 22public void Initialize(NativeSafeHandle requestHandler, bool moreData)
Core\IO\AsyncIOEngine.Read.cs (2)
17private NativeSafeHandle? _requestHandler; 26public void Initialize(NativeSafeHandle requestHandler, Memory<byte> memory)
Core\IO\AsyncIOEngine.Write.cs (1)
19protected override unsafe int WriteChunks(NativeSafeHandle requestHandler, int chunkCount, HTTP_DATA_CHUNK* dataChunks,
Core\IO\AsyncWriteOperationBase.cs (4)
14private NativeSafeHandle? _requestHandler; 18public void Initialize(NativeSafeHandle requestHandler, ReadOnlySequence<byte> buffer) 97private unsafe int WriteSequence(NativeSafeHandle requestHandler, int nChunks, ReadOnlySequence<byte> buffer, HTTP_DATA_CHUNK* pDataChunks, out bool fCompletionExpected) 122protected abstract unsafe int WriteChunks(NativeSafeHandle requestHandler, int chunkCount, HTTP_DATA_CHUNK* dataChunks, out bool completionExpected);
Core\IO\WebSocketsAsyncIOEngine.cs (2)
13private readonly NativeSafeHandle _handler; 23public WebSocketsAsyncIOEngine(IISHttpContext context, NativeSafeHandle handler)
Core\IO\WebSocketsAsyncIOEngine.Initialize.cs (2)
14private NativeSafeHandle? _requestHandler; 21public void Initialize(NativeSafeHandle requestHandler)
Core\IO\WebSocketsAsyncIOEngine.Read.cs (2)
31private NativeSafeHandle? _requestHandler; 58public void Initialize(NativeSafeHandle requestHandler, Memory<byte> memory)
Core\IO\WebSocketsAsyncIOEngine.Write.cs (1)
35protected override unsafe int WriteChunks(NativeSafeHandle requestHandler, int chunkCount, HTTP_DATA_CHUNK* dataChunks, out bool completionExpected)
NativeMethods.cs (53)
43private static partial int http_post_completion(NativeSafeHandle pInProcessHandler, int cbBytes); 46private static partial int http_set_completion_status(NativeSafeHandle pInProcessHandler, REQUEST_NOTIFICATION_STATUS rquestNotificationStatus); 49private static partial void http_indicate_completion(NativeSafeHandle pInProcessHandler, REQUEST_NOTIFICATION_STATUS notificationStatus); 52private static unsafe partial int register_callbacks(NativeSafeHandle pInProcessApplication, 62private static unsafe partial int http_write_response_bytes(NativeSafeHandle pInProcessHandler, HTTP_DATA_CHUNK* pDataChunks, int nChunks, [MarshalAs(UnmanagedType.Bool)] out bool fCompletionExpected); 65private static partial int http_flush_response_bytes(NativeSafeHandle pInProcessHandler, [MarshalAs(UnmanagedType.Bool)] bool fMoreData, [MarshalAs(UnmanagedType.Bool)] out bool fCompletionExpected); 68private static unsafe partial HTTP_REQUEST_V2* http_get_raw_request(NativeSafeHandle pInProcessHandler); 71private static partial int http_stop_calls_into_managed(NativeSafeHandle pInProcessApplication); 74private static partial int http_stop_incoming_requests(NativeSafeHandle pInProcessApplication); 77private static partial int http_disable_buffering(NativeSafeHandle pInProcessHandler); 80private static partial int http_set_response_status_code(NativeSafeHandle pInProcessHandler, ushort statusCode, [MarshalAs(UnmanagedType.LPStr)] string pszReason); 83private static unsafe partial int http_read_request_bytes(NativeSafeHandle pInProcessHandler, byte* pvBuffer, int cbBuffer, out int dwBytesReceived, [MarshalAs(UnmanagedType.Bool)] out bool fCompletionExpected); 89private static partial int http_set_managed_context(NativeSafeHandle pInProcessHandler, IntPtr pvManagedContext); 108NativeSafeHandle pInProcessHandler, 114NativeSafeHandle pInProcessHandler, 120NativeSafeHandle pInProcessHandler, 130NativeSafeHandle pInProcessHandler, 138private static partial int http_enable_websockets(NativeSafeHandle pInProcessHandler); 141private static partial int http_cancel_io(NativeSafeHandle pInProcessHandler); 144private static partial int http_close_connection(NativeSafeHandle pInProcessHandler); 147private static partial int http_response_set_need_goaway(NativeSafeHandle pInProcessHandler); 150private static unsafe partial int http_response_set_unknown_header(NativeSafeHandle pInProcessHandler, byte* pszHeaderName, byte* pszHeaderValue, ushort usHeaderValueLength, [MarshalAs(UnmanagedType.Bool)] bool fReplace); 153private static unsafe partial int http_has_response4(NativeSafeHandle pInProcessHandler, [MarshalAs(UnmanagedType.Bool)] out bool isResponse4); 156private static unsafe partial int http_response_set_trailer(NativeSafeHandle pInProcessHandler, byte* pszHeaderName, byte* pszHeaderValue, ushort usHeaderValueLength, [MarshalAs(UnmanagedType.Bool)] bool replace); 159private static unsafe partial int http_reset_stream(NativeSafeHandle pInProcessHandler, ulong errorCode); 162private static unsafe partial int http_response_set_known_header(NativeSafeHandle pInProcessHandler, int headerId, byte* pHeaderValue, ushort length, [MarshalAs(UnmanagedType.Bool)] bool fReplace); 165private static partial int http_get_authentication_information(NativeSafeHandle pInProcessHandler, [MarshalAs(UnmanagedType.BStr)] out string authType, out IntPtr token); 170public static void HttpPostCompletion(NativeSafeHandle pInProcessHandler, int cbBytes) 175public static void HttpSetCompletionStatus(NativeSafeHandle pInProcessHandler, REQUEST_NOTIFICATION_STATUS rquestNotificationStatus) 180public static unsafe void HttpRegisterCallbacks(NativeSafeHandle pInProcessApplication, 192internal static unsafe int HttpWriteResponseBytes(NativeSafeHandle pInProcessHandler, HTTP_DATA_CHUNK* pDataChunks, int nChunks, out bool fCompletionExpected) 197public static int HttpFlushResponseBytes(NativeSafeHandle pInProcessHandler, bool fMoreData, out bool fCompletionExpected) 202internal static unsafe HTTP_REQUEST_V2* HttpGetRawRequest(NativeSafeHandle pInProcessHandler) 207public static void HttpStopCallsIntoManaged(NativeSafeHandle pInProcessApplication) 212public static void HttpStopIncomingRequests(NativeSafeHandle pInProcessApplication) 217public static void HttpDisableBuffering(NativeSafeHandle pInProcessHandler) 222public static void HttpSetResponseStatusCode(NativeSafeHandle pInProcessHandler, ushort statusCode, string pszReason) 227public static unsafe int HttpReadRequestBytes(NativeSafeHandle pInProcessHandler, byte* pvBuffer, int cbBuffer, out int dwBytesReceived, out bool fCompletionExpected) 237public static void HttpSetManagedContext(NativeSafeHandle pInProcessHandler, IntPtr pvManagedContext) 253public static bool HttpTryGetServerVariable(NativeSafeHandle pInProcessHandler, string variableName, out string value) 258public static void HttpSetServerVariable(NativeSafeHandle pInProcessHandler, string variableName, string value) 264NativeSafeHandle pInProcessHandler, 275NativeSafeHandle pInProcessHandler, 285public static void HttpEnableWebsockets(NativeSafeHandle pInProcessHandler) 290public static bool HttpTryCancelIO(NativeSafeHandle pInProcessHandler) 304public static void HttpCloseConnection(NativeSafeHandle pInProcessHandler) 309public static unsafe void HttpResponseSetUnknownHeader(NativeSafeHandle pInProcessHandler, byte* pszHeaderName, byte* pszHeaderValue, ushort usHeaderValueLength, bool fReplace) 314public static unsafe void HttpResponseSetKnownHeader(NativeSafeHandle pInProcessHandler, int headerId, byte* pHeaderValue, ushort length, bool fReplace) 319internal static void HttpSetNeedGoAway(NativeSafeHandle pInProcessHandler) 324public static void HttpGetAuthenticationInformation(NativeSafeHandle pInProcessHandler, out string authType, out IntPtr token) 337internal static unsafe void HttpResponseSetTrailer(NativeSafeHandle pInProcessHandler, byte* pHeaderName, byte* pHeaderValue, ushort length, bool replace) 342internal static unsafe void HttpResetStream(NativeSafeHandle pInProcessHandler, ulong errorCode) 347internal static unsafe bool HttpHasResponse4(NativeSafeHandle pInProcessHandler)