private MsQuicApi(QUIC_API_TABLE *apiTable) { ApiTable = apiTable; fixed(byte *pAppName = s_appName) { var cfg = new QUIC_REGISTRATION_CONFIG { AppName = (sbyte *)pAppName, ExecutionProfile = QUIC_EXECUTION_PROFILE.LOW_LATENCY }; QUIC_HANDLE *handle; ThrowIfFailure(ApiTable->RegistrationOpen(&cfg, &handle), "RegistrationOpen failed"); Registration = new SafeMsQuicRegistrationHandle(handle); } }
private MsQuicApi(QUIC_API_TABLE *apiTable) { ApiTable = apiTable; fixed(byte *pAppName = "System.Net.Quic" u8) { var cfg = new QUIC_REGISTRATION_CONFIG { AppName = (sbyte *)pAppName, ExecutionProfile = QUIC_EXECUTION_PROFILE.LOW_LATENCY }; QUIC_HANDLE *handle; ThrowHelper.ThrowIfMsQuicError(ApiTable->RegistrationOpen(&cfg, &handle), "RegistrationOpen failed"); Registration = new MsQuicSafeHandle(handle, apiTable->RegistrationClose, SafeHandleType.Registration); } }