public Task ClosingConnectionAsync(Connection connection, DisconnectReason reason, string message) { Workload(); if (ClosingConnection == null) { return(Task.CompletedTask); } return(ClosingConnection?.Invoke(connection, reason, message)); }
private void CancelReqHandle() { ClosingConnection?.Invoke(this, new EventArgs()); remoteControl.Cancel(); }
private void CancelReqHandle() { ClosingConnection?.Invoke(this, new EventArgs()); CancellationEvent?.Invoke(this, new EventArgs()); StateProcess = StateProcessEnum.Cancelled; }