diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-02-23 16:37:07 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-02-23 16:37:07 (GMT) |
commit | c80110013f16d8aa4e6e9801e01ce9ccab1e6592 (patch) | |
tree | 7d02d379a82dda81fb2e3524b1631e7763baaf32 /src/com/isode/stroke/client | |
parent | f5e722a7f28f3407600e023700739ff3b9cc83c2 (diff) | |
download | stroke-c80110013f16d8aa4e6e9801e01ce9ccab1e6592.zip stroke-c80110013f16d8aa4e6e9801e01ce9ccab1e6592.tar.bz2 |
Allow non-standard ports on internal interface method
Diffstat (limited to 'src/com/isode/stroke/client')
-rw-r--r-- | src/com/isode/stroke/client/CoreClient.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/com/isode/stroke/client/CoreClient.java b/src/com/isode/stroke/client/CoreClient.java index 828906c..c01d57a 100644 --- a/src/com/isode/stroke/client/CoreClient.java +++ b/src/com/isode/stroke/client/CoreClient.java @@ -128,20 +128,23 @@ public class CoreClient { */ public void connect(ClientOptions o) { options = o; - connect(jid_.getDomain()); + connect(jid_.getDomain(), 5222); } /** - * Connect to the specified host, overriding the standard lookup rules. + * Connect to the specified host, overriding the standard lookup rules for the JID. + * + * Internal method, do not use. * * @param host Host to connect to, non-null. + * @param port Default port to use if SRV fails. */ - public void connect(String host) { + public void connect(String host, int port) { options = new ClientOptions(); disconnectRequested_ = false; assert (connector_ == null); /* FIXME: Port Proxies */ - connector_ = Connector.create(host, networkFactories.getDomainNameResolver(), networkFactories.getConnectionFactory(), networkFactories.getTimerFactory()); + connector_ = Connector.create(host, networkFactories.getDomainNameResolver(), networkFactories.getConnectionFactory(), networkFactories.getTimerFactory(), port); connectorConnectFinishedConnection_ = connector_.onConnectFinished.connect(new Slot1<Connection>() { public void call(Connection p1) { handleConnectorFinished(p1); |