Exemple #1
0
        public static void Main(string[] args)
        {
            GaduServer gaduServer = new GaduServer("91.197.13.26", 8074);

            gadu = new Gadu();

            gadu.Reciever.OnLoginOK           += new OnLoginOKHandler(loginok);
            gadu.Reciever.OnLoginFailed       += new OnLoginFailedHandler(loginfailed);
            gadu.Reciever.OnRecieveMessage    += new OnRecieveMessageHandler(RecvMsg);
            gadu.Reciever.OnRecieveMessageAck += new OnRecieveMessageAckHandler(MsgAck);

            gadu.Sender.OnPacketSent += new OnPacketSentHandler(packet);

            gadu.Connect(gaduServer);

            gadu.Login(179824, "password");

            while (!exit)
            {
                System.Threading.Thread.Sleep(1000);
            }

            Console.WriteLine("Koncze dzialanie");

            gadu.Logout();
            gadu.Disconnect();
        }
Exemple #2
0
 private static void Disconnect()
 {
     Console.WriteLine("Disconnecting...");
     try
     {
         gadu.Logout();
     }
     catch (Exception e)
     {
         Console.WriteLine("E: " + e.Message);
         Console.WriteLine("E: " + e.StackTrace);
     }
     finally
     {
         gadu.Disconnect();
         gadu = null;
     }
 }
Exemple #3
0
        public static void Main(string[] args)
        {
            GaduServer gaduServer = new GaduServer("91.197.13.26", 8074);

            gadu = new Gadu();

            gadu.Reciever.OnLoginOK        += new OnLoginOKHandler(LoginOK);
            gadu.Reciever.OnLoginFailed    += new OnLoginFailedHandler(LoginFailed);
            gadu.Reciever.OnUserListReplay += new OnUserListReplayHandler(UserList);

            gadu.Connect(gaduServer);
            gadu.Login(179824, "");

            while (end == false)
            {
                System.Threading.Thread.Sleep(100);
            }

            gadu.Disconnect();
        }
Exemple #4
0
        public static void Main(string[] args)
        {
            GaduServer gaduServer = new GaduServer("91.197.13.26", 8074);
            Gadu       gadu       = new Gadu();

            gadu.Reciever.OnLoginOK        += new OnLoginOKHandler(loginok);
            gadu.Reciever.OnLoginFailed    += new OnLoginFailedHandler(loginfailed);
            gadu.Reciever.OnLoginNeedEmail += new OnLoginNeedEmailHandler(loginneedemail);

            gadu.Sender.OnPacketSent += new OnPacketSentHandler(packet);

            gadu.Connect(gaduServer);

            gadu.Login(179824, "password");

            System.Threading.Thread.Sleep(5000);

            gadu.Logout();
            gadu.Disconnect();
        }