Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
decipher #1
Member since Oct 2006 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: Newbie Ques
Hi

    I m trying to make a simple form to send message to other side using google talk.
    this is the code i m using
    i m not getting ne error still no message is being recieved at the other end..


  private void btnSendMsg_Click(object sender, EventArgs e)
        {
            XmppClientConnection connect = new XmppClientConnection();
            connect.Server = "gmail.com";
           connect.ConnectServer="talk.google.com";
            connect.AutoResolveConnectServer = true;
            connect.Username=txtUserID.Text;
            connect.Password = txtPwd.Text;
            connect.Port = int.Parse("5222");
            connect.Priority = int.Parse("10");
            connect.UseSSL = false;
            connect.SocketConnectionType = agsXMPP.net.SocketConnectionType.Direct;
            connect.Open();
            MessageBox.Show("opened");
            connect.Show = agsXMPP.protocol.client.ShowType.chat;
            agsXMPP.protocol.client.Message msg = new agsXMPP.protocol.client.Message(txtToSendID.Text,    agsXMPP.protocol.client.MessageType.chat, txtMsg.Text);
            connect.Send(msg);
       }
Thanx n Rgards
Decipher
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

this fault is decribed at least 5 times here in the forums. Please use the seach function. agsXMPP connects asynchronous. For this reason the Open function returns immediately which does not mean that your XMPP session is connected and authenticated.
Also look at all samples that ship with the SDK.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS