// TODO call this for graceful shutdown? public void ShutDown( QUIC_CONNECTION_SHUTDOWN_FLAG Flags, ushort ErrorCode) { MsQuicApi.Api.SessionShutdownDelegate( _nativeObjPtr, (uint)Flags, ErrorCode); }
public void Shutdown( QUIC_CONNECTION_SHUTDOWN_FLAG Flags, ushort ErrorCode) { var status = _api.ConnectionShutdownDelegate( _nativeObjPtr, (uint)Flags, ErrorCode); MsQuicStatusException.ThrowIfFailed(status); }
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)); }
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()); }