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(); }
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(); }
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(); }
private static void Connect() { try { Console.WriteLine("Connecting..."); GaduServer gaduServer = new GaduServer("91.197.13.26", 8074); gadu = new Gadu(); gadu.Reciever.OnLoginOK += new OnLoginOKHandler(Reciever_OnLoginOK); gadu.Reciever.OnLoginFailed += new OnLoginFailedHandler(Reciever_OnLoginFailed); gadu.Reciever.OnRecieveMessage += new OnRecieveMessageHandler(Reciever_OnRecieveMessage); gadu.Sender.OnPacketSent += new OnPacketSentHandler(Sender_OnPacketSent); gadu.Connect(gaduServer); gadu.Login(179824, "secretpass"); gadu.changeStatus(GaduPacketConstans.GG_STATUS_AVAIL_DESCR, "http://dotgadu.sf.net"); } catch (Exception e) { Console.WriteLine("E: " + e.StackTrace); Console.WriteLine("E: " + e.Message); ReConnect(); } }