Not logged in. · Lost password · Register
Forum: agsXMPP RSS
What is correct method
Avatar
hipath #1
Member since Dec 2012 · 4 posts · Location: Athens, Grece
Group memberships: Members
Show profile · Link to this post
Subject: agsxmpp BOSH through corporate proxy server
Hi All,

I want to connect with agsxmpp BOSH protocol through a corporate web proxy server. I have found through search only this reference on this posting: http://forum.ag-software.de/thread/1095-AgsXMPP-Http-Proxy

However, I am confused, what is the appropriate way, as code displayed in the above link utlising the cast to the BoshClientSocket class:

case agsXMPP.net.SocketConnectionType.Bosh:
            // setup connect url
             connectUrl = "http://" + profile.proxyHost + ":" + profile.proxyPort;
            // setup credentials for proxy
                    if ( profile.useProxyAuth == true ) {
                         BoshClientSocket sock = xmpp.ClientSocket as BoshClientSocket;
                         sock.Proxy.Credentials = new NetworkCredential(profile.proxyUser, profile.proxyPass);
                     }
                        xmpp.ConnectServer = connectUrl;


or by utilising a cast to the PollClientSocket class as suggested further down in the above reference post?

Any help will be greatly appreciated,

Thank you very much for your kind attention and consideration.

Regards,

George
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
BoshClientSocket has a WebProxy property. You have to cast to BoshClientSocket and set the WebProxy property.

Alex
Avatar
hipath #3
Member since Dec 2012 · 4 posts · Location: Athens, Grece
Group memberships: Members
Show profile · Link to this post
Thanks Alex, I will try it and get back to you if any problems. Appreciate feedback.
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