Exemplo n.º 1
0
        public void Login(string user, string password)
        {
            RegisterPublicKey();
            LoginRequestInitiator c = factory.CreateFromConversationType <LoginRequestInitiator>();

            c.RemoteEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1026); // TODO - Make dynamic
            c.Username       = user;
            c.Password       = password;
            c.Launch();
        }
 public void RunUsersUpdate()
 {
     while (isRunning)
     {
         if (SLRM.ActiveServer != null)
         {
             ListUsersRequestInitiator c = factory.CreateFromConversationType <ListUsersRequestInitiator>();
             c.RemoteEndPoint = SLRM.ActiveServer.ChatServerEndpoint;
             c.Launch();
             Thread.Sleep(5000);
         }
         else
         {
             Thread.Sleep(100);
         }
     }
 }
 private void Run()
 {
     while (isRunning)
     {
         Console.WriteLine("Getting Servers from Registry");
         ListServersRequestInitiator c = factory.CreateFromConversationType <ListServersRequestInitiator>();
         c.RemoteEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1024); // TODO - Make dynamic
         c.Launch();
         Thread.Sleep(10000);
     }
 }
Exemplo n.º 4
0
 private void Run()
 {
     while (true)
     {
         if (EndPoint != null)
         {
             HeartbeatInitiator c = Factory.CreateFromConversationType <HeartbeatInitiator>();
             c.RemoteEndPoint = EndPoint;
             c.Launch();
         }
         Thread.Sleep(10000);
     }
 }
 private void Run()
 {
     while (true)
     {
         if (EndPoint != null)
         {
             Console.WriteLine("Connecting to Registry Server");
             RegisterServerInitiator c = Factory.CreateFromConversationType <RegisterServerInitiator>();
             c.RemoteEndPoint = EndPoint;
             c.Server         = Server;
             c.Launch();
         }
         Thread.Sleep(10000);
     }
 }
Exemplo n.º 6
0
 private void Run()
 {
     while (isRunning)
     {
         Console.WriteLine("Attempting to get new messages");
         if (SLRM.ActiveServer != null)
         {
             NewMessagesRequestInitiator c = factory.CreateFromConversationType <NewMessagesRequestInitiator>();
             c.RemoteEndPoint = SLRM.ActiveServer.ChatServerEndpoint;
             c.ES             = ES;
             c.Launch();
         }
         Thread.Sleep(5000);
     }
 }
 private void Run()
 {
     while (isRunning)
     {
         if (SLRM.ActiveServer != null && URM.GetUserId() != null)
         {
             Console.WriteLine("Connecting to Chat Server");
             ConnectToChatInitiator c = Factory.CreateFromConversationType<ConnectToChatInitiator>();
             c.RemoteEndPoint = ServerListResourceManager.GetInstance().ActiveServer.ChatServerEndpoint;
             c.User = new User(URM.GetUserId(), null);
             c.Launch();
             Thread.Sleep(10000);
         }
         else
         {
             Thread.Sleep(100);
         }
     }
 }