Exemple #1
0
        private void Context_Closed()
        {
            if (InvokeRequired)
            {
                Invoke((MethodInvoker) delegate {
                    Context_Closed();
                });
                return;
            }

            context.Message -= Context_Message;
            context.Closed  -= Context_Closed;
            context.Close();
            status.Text = "WebSocket closed.";
        }
Exemple #2
0
 private void ClientForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     context.Message -= Context_Message;
     context.Closed  -= Context_Closed;
     context.Close();
 }