Exemplo n.º 1
0
        static void Main(string[] args)
        {
            int           port   = 13356;
            IPAddress     ip     = IPAddress.Parse("127.0.0.1");
            RSAEncryption client = new RSAEncryption(ip, port);

            client.RecievedData += Write;
            Console.WriteLine("What u want fam?\n\"c\" to cancel");

            while (true)
            {
                string userInput = Console.ReadLine();
                client.WriteData(Encoding.UTF8.GetBytes(userInput));
                if (userInput.ToLower() == "c")
                {
                    break;
                }
            }
            client.Close();
        }