Project

General

Profile

How do we set a custom port?

Martin Alderson
Added over 2 years ago

Can't see this in the docs either.


Replies (4)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 2 years ago

TigaseSwift for connection uses DNS SRV records, so it would be best to create proper DNS SRV records for server.

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 2 years ago

By default TigaseSwift library uses DNS resolution for domain name which is part of user JID. During this resolution it looks for DNS SRV record for domain, ie. in case of JID test@example.com TigaseSwift library looks for DNS SRV records for _xmpp-client._tcp.example.com. If it finds SRV records then it uses for connection port listed in this SRV records. If there is no SRV records then TigaseSwift uses plain DNS resolution (looks for A records) and uses default port assigned to XMPP client to server connections which is 5222.

Currently there is no other way to tell TigaseSwift which port to connect to. If there is a needed then I can work on feature which will allow you to pass port to which TigaseSwift should connect to.

Added by Martin Alderson over 2 years ago

This would be better as it would match the Java client more exactly.

Thanks

Martin

On 1 Jul 2016 5:22 p.m., support@tigase.org wrote:

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 2 years ago

I added this feature in task #4303, so it is available now. Please look into this task for more details.

I still think that proper configuration of DNS SRV records is better than usage of hardcoded server port inside client.

    (1-4/4)