Created
November 22, 2012 14:40
Revisions
-
remko revised this gist
Nov 22, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ int main(int, char**) { Client* client = new Client("me@server.lit", "mypassword", networkFactories); /* Substituting the JID and password accordingly. */ ClientOptions options; options.boshURL = URL::fromString("http://server.lit/http-bind/"); /* Substituting the correct URL to the BOSH endpoint */ options.boshHTTPConnectProxyURL = URL::fromString("https://wwwproxy.server.lit:8080/"); /* Substituting the host/port for those of the proxy */ options.boshHTTPConnectProxyAuthID = "proxy username"; /* substituting the user name needed to authenticate with the proxy. Remove this line if the proxy doesn't require authentication */ options.boshHTTPConnectProxyAuthPassword = "proxy password"; /* substituting the user password needed to authenticate with the proxy. Remove this line if the proxy doesn't require authentication */ -
remko created this gist
Nov 22, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ #include <Swiften/Swiften.h> using namespace Swift; int main(int, char**) { SimpleEventLoop eventLoop; BoostNetworkFactories networkFactories(&eventLoop); Client* client = new Client("me@server.lit", "mypassword", networkFactories); /* Substituting the JID and password accordingly. */ ClientOptions options; options.boshURL= URL::fromString("http://server.lit/http-bind/"); /* Substituting the correct URL to the BOSH endpoint */ options.boshHTTPConnectProxyURL = URL::fromString("https://wwwproxy.server.lit:8080/"); /* Substituting the host/port for those of the proxy */ options.boshHTTPConnectProxyAuthID = "proxy username"; /* substituting the user name needed to authenticate with the proxy. Remove this line if the proxy doesn't require authentication */ options.boshHTTPConnectProxyAuthPassword = "proxy password"; /* substituting the user password needed to authenticate with the proxy. Remove this line if the proxy doesn't require authentication */ /* Insert here whatever handlers you want for receiving messages etc. - see http://swift.im/swiften/guide/ */ client->connect(options); eventLoop.run(); return 0; }