Exemple #1
0
        public Task ClosingConnectionAsync(Connection connection, DisconnectReason reason, string message)
        {
            Workload();
            if (ClosingConnection == null)
            {
                return(Task.CompletedTask);
            }

            return(ClosingConnection?.Invoke(connection, reason, message));
        }
Exemple #2
0
 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;
 }