[JDEV] SRV record and sending S2S

David Waite mass at akuma.org
Tue Jan 15 09:34:03 CST 2002

The only way I could see client support working is if the machine(s) that
the A record pointed to also did redirection to an appropriate host, i.e.
1. client uses SRV if supported
2. if SRV is not supported, connect to last known IP for that host
3. if IP is not cached or connection fails, connect to the machine pointed
to by the A record
4. the A record machine just runs a fake c2s component which redirects you
to an appropriate machine, i.e.

C: <stream:stream to='jabber.org' xmlns='...>
S: <stream:stream to='jabber.org' xmlns='...>
C: <iq type='get'><query
S: <iq type='error'><error code='307'>im.jabber.org</error></iq><!--
redirect to machine im.jabber.org -->
-server disconnects-
-client connects to im.jabber.org-
C: <stream:stream to='jabber.org' xmlns='...>
and so on.

The reason for this is that SRV lookups are _very hard_ from most languages.
For some operating systems, you would need to either do the DNS queries
yourself by hand, or port libresolv. I don't believe that Java supports SRV
lookups without JNDI, and I don't think either visual basic 6 or the
libraries on .Net support it at all.

-David Waite

----- Original Message -----
From: "Thomas Parslow (PatRat)" <patrat at rat-software.com>
To: "Jeremie" <jdev at jabber.org>
Sent: Monday, January 14, 2002 3:28 PM
Subject: Re[4]: [JDEV] SRV record and sending S2S

> Hi,
> Thanks for the reply Jeremie, I'll be trying it again if the guy who
> hosts my domain has time to add the SRV record again (we had problems
> with automatic tools so it got removed) :)
> >_jabber._tcp    IN SRV  30 30 5269 servera.domain.org.
> Does any one have any thoughts on a how a client should use SRV
> records? If the port given in the SRV record is the S2S port then how
> would the client determine which port to connect to?
> Thomas Parslow (PatRat) ICQ #:26359483
> Rat Software
> http://www.rat-software.com/
> Please leave quoted text in place when replying
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev

More information about the JDev mailing list