Exemplo n.º 1
0
        void OnDisconnected(ExceptionalEventArgs e)
        {
            Continue = false;

            if (Disconnected != null)
                Disconnected(this, e);
        }
Exemplo n.º 2
0
 void OnDisconnected(ExceptionalEventArgs e)
 {
     if (Disconnected != null)
         Disconnected(this, e);
 }
        void OnDisconnect(ExceptionalEventArgs e)
        {
            if (IsDisconnected) 
                return;
            IsDisconnected = true;

            if (writer != null) writer.Continue = false;
            if (reader != null) reader.Continue = false;

            try { writerThread.Abort(); } catch { }
            try { readerThread.Abort(); } catch { }

            WrapCallback(() => callbackManager.SetExceptionForAll(new ClientDisconnectedException(e.Description, e.Exception)));
            invokeId = 0;

            WrapCallback(() =>
            {
                if (Disconnected != null)
                    Disconnected(this, e);
            });
        }
 void OnDisconnected(ExceptionalEventArgs e) => Disconnected?.Invoke(this, e);
 void OnPacketProcessorDisconnected(object sender, ExceptionalEventArgs e)
 {
     OnDisconnect(e);
 }