コード例 #1
0
 // TODO call this for graceful shutdown?
 public void ShutDown(
     QUIC_CONNECTION_SHUTDOWN_FLAG Flags,
     ushort ErrorCode)
 {
     MsQuicApi.Api.SessionShutdownDelegate(
         _nativeObjPtr,
         (uint)Flags,
         ErrorCode);
 }
コード例 #2
0
        public void Shutdown(
            QUIC_CONNECTION_SHUTDOWN_FLAG Flags,
            ushort ErrorCode)
        {
            var status = _api.ConnectionShutdownDelegate(
                _nativeObjPtr,
                (uint)Flags,
                ErrorCode);

            MsQuicStatusException.ThrowIfFailed(status);
        }
コード例 #3
0
ファイル: MsQuicConnection.cs プロジェクト: zdbobi/runtime
        private ValueTask ShutdownAsync(
            QUIC_CONNECTION_SHUTDOWN_FLAG Flags,
            long ErrorCode)
        {
            uint status = MsQuicApi.Api.ConnectionShutdownDelegate(
                _ptr,
                (uint)Flags,
                ErrorCode);

            QuicExceptionHelpers.ThrowIfFailed(status, "Failed to shutdown connection.");

            return(new ValueTask(_shutdownTcs.Task));
        }
コード例 #4
0
        private ValueTask ShutdownAsync(
            QUIC_CONNECTION_SHUTDOWN_FLAG Flags,
            long ErrorCode)
        {
            if (NetEventSource.IsEnabled)
            {
                NetEventSource.Enter(this);
            }

            uint status = MsQuicApi.Api.ConnectionShutdownDelegate(
                _ptr,
                (uint)Flags,
                ErrorCode);

            QuicExceptionHelpers.ThrowIfFailed(status, "Failed to shutdown connection.");

            if (NetEventSource.IsEnabled)
            {
                NetEventSource.Exit(this);
            }
            return(_shutdownTcs.GetTypelessValueTask());
        }