public void SendRSAKey() { if (Connection != null) { if (Connection.Connected) { var key = Connection.RSAKey.GetMyPublicKey(); var msg = new CpRSAKey(key); msg.Send(Connection, false); } } }
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); }