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