Not logged in. · Lost password · Register
Forum: agsXMPP SDK Support RSS
Avatar
steelspace #1
Member since Mar 2007 · 11 posts
Group memberships: Members
Show profile · Link to this post
Subject: HTTP polling - Unhadled Exception
When you setup connection via proxy (HTTP polling) and the host does not respond on time, the exception is raised, but from code in a separate thread which is not possible to catch in the calling application. Exception is raised from the .NET class WebClient.

   at System.Net.HttpWebRequest.GetRequestStream()
   at agsXMPP.net.PollClientSocket.PollThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
This post was edited on 2008-01-29, 10:50 by steelspace.
Avatar
Alex #2
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
hi steelspace,

is there a way to cause this exception?I think it should be no problem to catch it and raise an Error on XmppCLientConnection.

Alex

PS: Can you send me a roster request again? I broke my roster and lost your jids :(
Alexander Gnauck
AG-Software
Avatar
steelspace #3
Member since Mar 2007 · 11 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex, my jid is steelspace@jabber.cz

As far as the exception - I can't catch it because it is thrown i a separate thread. It occurs only if you use HTTP polling (that's why it is raised by WebClient object).

Next exception occurs if you specify improper connect server:

   at agsXMPP.net.PollClientSocket.PollThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()</StackTrace><ExceptionString>System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---&amp;gt; System.IO.IOException: The handshake failed due to an unexpected packet format.
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
.....

Petr
Avatar
Alex #4
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
fixed in SVN
Alexander Gnauck
AG-Software
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 SDK Support RSS