I would like to write a simple google talk client in C++ using libcurl.Google talk uses XMPP as communication protocol and it listens at talk.google.com:5222. First of all I try to access google talk from commandline using curl. If I try
curl talk.google.com:5222 -d "<stream:stream to='gmail.com' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' version='1.0'>"
I get response 302 "The document has moved" If I try to use telnet client
telnet talk.google.com 5222
I can get a valid XMPP response Also if I try to access chat.facebook.com:
curl chat.facebook.com:5222 -d "<stream:stream to='chat.facebook.com' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' version='1.0'>"
I get again a valid XMPP response, the only problem is with talk.google.com.
Could someone point out my mistake?