using System; using System.Collections.Generic; using System.Text; using System.Xml; using System.Net; using System.Net.Sockets; namespace ler_Manager { class Program { static UdpClient udp; static void UDPReciver(IAsyncResult res) { IPEndPoint remote = new IPEndPoint(IPAddress.Any, 8050); byte[] buffer = udp.EndReceive(res, ref remote); string encryptedString = Encoding.Default.GetString(buffer); Decrypt dec = new Decrypt(@"C:\privatekey.txt"); //Console.WriteLine("Write New Value"); Console.WriteLine(dec.DecryptStringToString(encryptedString)); udp.BeginReceive(new AsyncCallback(UDPReciver), null); } static void Main(string[] args) { udp = new UdpClient(8050); udp.BeginReceive(new AsyncCallback(UDPReciver), null); Console.ReadLine(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)