Login() public méthode

public Login ( string uid, string password ) : void
uid string
password string
Résultat void
Exemple #1
0
 public void JabberNetworkTest() {
   JabberNetwork jabber = new JabberNetwork(null, "5222", true, null);
   Console.Write("Please enter jabber id and password: ");
   string input = Console.ReadLine();
   string[] parts = input.Split(' ');
   jabber.Login(parts[0], parts[1]);
   Console.ReadLine();
   jabber.Logout();
 }
Exemple #2
0
    public static new SocialNode CreateNode() {
      SocialConfig social_config;
      NodeConfig node_config;
      IpopConfig ipop_config;

      byte[] certData = SocialUtils.ReadFileBytes("local.cert");
      string certb64 = Convert.ToBase64String(certData);
      social_config = Utils.ReadConfig<SocialConfig>("social.config");
      node_config = Utils.ReadConfig<NodeConfig>(social_config.BrunetConfig);
      ipop_config = Utils.ReadConfig<IpopConfig>(social_config.IpopConfig);

      SocialNode node = new SocialNode(node_config, ipop_config, certb64);
      HttpInterface http_ui = new HttpInterface(social_config.HttpPort);
      SocialDnsManager dns_manager = new SocialDnsManager(node);
      JabberNetwork jabber = new JabberNetwork(social_config.JabberHost,
                                               social_config.JabberPort,
                                               social_config.AutoFriend,
                                               node);

      http_ui.ProcessEvent += node.ProcessHandler;
      http_ui.ProcessEvent += jabber.ProcessHandler;
      http_ui.ProcessEvent += dns_manager.ProcessHandler;

      node.Shutdown.OnExit += http_ui.Stop;
      node.Shutdown.OnExit += jabber.Logout;

      node.SetGlobalBlock(social_config.GlobalBlock);
      node.LoadState();
      if (social_config.AutoLogin) {
        jabber.Login(social_config.JabberID, social_config.JabberPass);
      }
      http_ui.Start();
      return node;
    }