Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
RasmusKL #1
Member since Dec 2006 · 8 posts
Group memberships: Members
Show profile · Link to this post
Subject: GTalk connection failing...
Hey,

Thanks for a great looking library :-)

I've been experimenting with using Google Talk with the library, but I can't get past Securing state.. The current (rather long) set up of the XmppClientConnection follows... I've pieced it together from the various other posts on the forum, but still can't get it to work. I also included the xml debug information :-)

Thanks,
 - Rasmus.


Code:

XmppClientConnection xmpp = new XmppClientConnection();

xmpp.Server = "gmail.com";
xmpp.ConnectServer = "talk.google.com";
xmpp.SocketConnectionType = agsXMPP.net.SocketConnectionType.Direct;
xmpp.Port = 5222;
xmpp.UseSSL = false;
xmpp.Status = "Online";
xmpp.Priority = 5;
xmpp.AutoResolveConnectServer = true;
xmpp.AutoRoster = true;
xmpp.RegisterAccount = false;
xmpp.Show = agsXMPP.protocol.client.ShowType.chat;
xmpp.Open("login", "password");



Debug Info (Connection State is given events, Read/Write is XML events):

Connection State: Connecting
Connection State: Connected
Write: <stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
Read: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="7CBFED48A06E1329" >
Read: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
Connection State: Securing
Write: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
Read: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
Connection State: Disconnected
Avatar
Alex #2
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello RasmusKL,
Quote by RasmusKL:
Thanks for a great looking library :-)
would be greater if it also works for you ;-)

  • are you on .NET 1.1 or 2.0?
  • are you on Deskop or Pocket PC with compact framework?
  • Did you try our MiniClient sample? If yes does it work for you?

if you use:
xmpp.AutoResolveConnectServer = true;

you don't need to sepcify a connect server

xmpp.ConnectServer = "talk.google.com";

Alex
Avatar
RasmusKL #3
Member since Dec 2006 · 8 posts
Group memberships: Members
Show profile · Link to this post
Am on 2.0, Desktop.

Havn't tried the MiniClient sample, I'll do that now - and return :-)

- Rasmus.
Avatar
RasmusKL #4
Member since Dec 2006 · 8 posts
Group memberships: Members
Show profile · Link to this post
The MiniClient works.

So I'll take a look at that and try again... :-)

One question though, I got the feeling from your page that file transfers doesn't work with Google Talk - Am I better off using a Jabber server, if I want filetransfer or ... ?

- Rasmus.
Avatar
Alex #5
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
there are different ways of transferring files in XMPP. agsXMPP supports most of them and the most common is currently the SOCKS5 file transfer which is also included in the MiniClient sample.

The GoogleTalk server is not always 100% compliant with the XMPP specs. Which means that the server sometimes drops packets which is doesn't understand, or responds with an error packet. If you need only presence and chat then the GTalk server should work fine. If you want more like Socks5 file transfers and other stuff then i think it would be better to use another open server, or install your own server.

Alex
Avatar
RasmusKL #6
Member since Dec 2006 · 8 posts
Group memberships: Members
Show profile · Link to this post
I got it to work, problem was that I didn't include Mono.Security, so it threw an exception. :-)
Avatar
Alex #7
Member since Feb 2003 · 4288 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
this is weird because you need the Mono.Security.dll only under dotNET 1.1 and MONO. dotNet 2.0 has build in SSL support.
Are you using the correct libraries?

Alex
Avatar
RasmusKL #8
Member since Dec 2006 · 8 posts
Group memberships: Members
Show profile · Link to this post
Hrm, actually I was using runtime version 1.1, switched to 2.0 and it runs without Mono.Security now.

My problem with GMail Chat (other post) still remains though :-(
Avatar
RasmusKL #9
Member since Dec 2006 · 8 posts
Group memberships: Members
Show profile · Link to this post
Ah, I found out why I was using runtime version 1.1 now. Apparently, in the download, the pre-compiled dll under bin/Windows/Release is 1.1 runtime.. However if you rebuild the entire 2005 project, it is replaced with a runtime 2.0 version...
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