Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
Vlad #1
Member since Feb 2006 · 4 posts · Location: Montreal, Canada
Group memberships: Members
Show profile · Link to this post
Subject: System.Net.Sockets.SocketException
Hi,

I'm trying to connect to Google Talk with MiniClient and get this output:

Port: 5222
Target: talk.l.google.com
OnXmppConnectionStateChanged: Connecting
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
OnXmppConnectionStateChanged: Disconnected
OnClose

The latest version of the MiniClient was recompiled with VS2005. Do you have any idea about this? Could it be some firewall issue?

Thanks,

Vlad
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello Vlad,

Do you run the latest code from the SVN repository?
Did you set UseSSL to false when connecting on port 5222?
Could you post more details about the Socket exception and the XML Debug when available? For me i looks like you get no connection at all to the google server. Of course it could be a firewall issue if you firewall blocks outgoing ports. But the lib found the talk.l.google.com server. So at least dns udp ports are open in your firewall.

Alex
Avatar
Vlad #3
Member since Feb 2006 · 4 posts · Location: Montreal, Canada
Group memberships: Members
Show profile · Link to this post
Alex,

Sources have been downloaded from your site couple days ago. I think it is the latest release 0.71.
I see exception was raised in function EndConnect(IAsyncResult ar) during calling of _socket.EndConnect(ar); Timeout happend. Socket waits around 20 sec. In my case Google Talk client conects to server after 30 sec.
I am trying to find possibility to change timeout for asynchronous connection. It is not obvious. Could you help me?

Thanks,

Vlad
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello Vlad,

30 seconds for a connect is very long.
You can adjust socket properties with SocketOptionName
http://msdn.microsoft.com/library/default.…?url=/library…
There is a SendTimeout and a ReceiveTimeout. But no ConnectTimeout.

Alex
Avatar
Alex #5
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
could you try to set
xmppCon.AutoResolveConnectServer = false;
and
xmppCon.ConnectServer = "talk.google.com";
Then it doesnt resolve srv records and is connecting to talk.google.com.

Alex
Avatar
Vlad #6
Member since Feb 2006 · 4 posts · Location: Montreal, Canada
Group memberships: Members
Show profile · Link to this post
Alex,

Problem is still the same. Exception says "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond".
It is ridiculous that Socket does not have timeout's configuration. SendTimeout and ReceiveTimeout work just for synchronous mode. I will try to play with Google a little bit. But I fill I need to use another public server.

Thanks a lot, guys.
You have done amazing job.
Avatar
Alex #7
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Vlad,

tried it again here. It takes us only one second to connect, login, receive roster and set presence.
Why is it do slow on your machine? Are you behind a special proxy or smth else? Did you try to rewrite the connect code to be synchronous?
Is there anything we could do to get it working on your machine?
Feel free to use our public xmpp server at ag-software.de.

Alex
Avatar
Vlad #8
Member since Feb 2006 · 4 posts · Location: Montreal, Canada
Group memberships: Members
Show profile · Link to this post
Alex,

I have tried _socket.Connect(endPoint). Result is the same. I do this in the office and suppose our corporate firewall causes timeout. I'll try to use MiniClient at home ASAP.
What do I need to do for using your server?

Thanks,

Vlad
Avatar
Alex #9
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by "Vlad":
What do I need to do for using your server?
You need only a jabber/xmpp client to register a account on the server.
Here you can also find a small list of public servers:
http://www.xmpp.net/
myjabber.net is also a good because its very near to your location ;-)

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