Ejemplo n.º 1
0
        private static void listenerSocket_IsListeningChanged(object sender, EventArgs e)
        {
            AsynchronousSocket socket = (sender as AsynchronousSocket);

            if (socket.IsListening && (StartedListening != null))
            {
                StartedListening.Invoke(socket, new EventArgs());
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Starts the client listening for messages.
 /// </summary>
 private void StartListening()
 {
     _listenThread = new Thread(ListenForMessages);
     _listenThread.Start();
     StartedListening?.Invoke(this, null);
 }