Example #1
0
        public void SendRSAKey()
        {
            if (Connection != null)
            {
                if (Connection.Connected)
                {
                    var key = Connection.RSAKey.GetMyPublicKey();
                    var msg = new CpRSAKey(key);

                    msg.Send(Connection, false);
                }
            }
        }
Example #2
0
        public void ProcessConnection()
        {
            if (Global.Connection == null)
            {
                CreateConnection();
            }
            else
            {
                Global.Connection.Disconnect();
                CreateConnection();
            }

            var key = Global.Connection.RSAKey.GetMyPublicKey();
            var msg = new CpRSAKey(key);

            msg.Send(Global.Connection);
        }