On Wed, Dec 03, 2008 at 03:01:44PM +0000, David Chisnall wrote: > I think we might be confusing two things here. SRV records are used by > some Jabber servers so they can run on a nonstandard port. You don't > want to be implementing the DNS lookup yourself here, because your OS has > a nice resolver that does it for you and exposes it via a clean, > portable, interface. I've attached my ETSocket work-not-really- > in-progress which shows how to do this. It would be easy to just > replace the connect code in XMPPKit with this, although I was waiting > until ETSocket was a bit more completed so that we could simplify > XMPPConnection a lot.
I totally missed out on getaddrinfo() when I started playing around with this, because the manpages fooled me into believing that it only looked at /etc/services to determine the port number for a given service and combined this with the results of an A/AAAA-lookup. That's why I ended up wrapping a C-library to do the dirty work for me. But if getaddrinfo() is sufficient for the task at hand, I'm happy to throw my old code out of the window and go for the simpler solution. After all, I'm doing this to learn something. As for serverless messaging vs. jabber servers referenced by SRV records: I was talking about and working on the latter but also had the former on my mind, because both seem to be ways to hide the particularities a connection from the user. So I'm sorry for any confusion caused. But thank you again for your support and your ETSocket-code. I'll try to have a closer look at it next weekend. best regards Niels _______________________________________________ Etoile-discuss mailing list [email protected] https://mail.gna.org/listinfo/etoile-discuss
