Beispiel #1
0
        private void onDataReceived(object sender, DataCompleteEventArgs e)
        {
            int index = clients.IndexOf((ServerClient)sender);

            if (index < 0)
            {
                return;
            }

            ClientDataReceived?.Invoke(this, new ListDataCompleteEventArgs(index, e.Data));
        }
 private void onClientDataReceived(object sender, DataCompleteEventArgs e)
 {
     Console.WriteLine("Client data received: " + Encoding.UTF8.GetString(e.Data));
     client.Disconnect();
 }