private void button1_Click(object sender, EventArgs e) { AppClient.Initialize(Encoding.UTF8, EncryptionType.DPL128, ".", textBox1.Text); AppClient.PacketReceived += new PacketReceivedHandler(AppClient_PacketReceived); button1.Enabled = false; }
static void Main(string[] args) { Console.Write("SNPS Name :"); AppClient.ServerName = Console.ReadLine(); AppClient.Initialize(Encoding.UTF8, EncryptionType.DPL128, ".", "upl://128.256." + Process.GetCurrentProcess().Id.ToString()); AppClient.PacketReceived += new PacketReceivedHandler(AppClient_PacketReceived); Console.WriteLine("UPL :"); string destupl = Console.ReadLine(); while (true) { string data = Console.ReadLine(); Sender.SendAnswer(data, destupl, ".", 0); } }