~samwhited/xmpp

ref: 52be89df867be9fc4e8ba83b0c3880887a6485ba xmpp/lookup.go -rw-r--r-- 5.9 KiB
Add Session API and remove Conn
Remove Go 1.6 support

By the time this is anywhere near complete Go 1.7 will be out anyways,
and for the purpose of development it's way easier to just stick to
using one version of the language. I'm not against adding 1.6 support
back later, and it should be trivial to do.
Add NoLookup (no SRV or TXT lookup) to Dialer

Also use DialContext on Go 1.7 and avoid annoying hacks
Use Conn as the session and remove Session
Error if SRVs indicate that there is no service
Don't run lookup methods if ctx is already done
Cancel a lookup if another lookup method succeedes
Panic immediately on invalid conntype in lookup
Remove JRD host-meta lookup.

I misread the spec, the XML version is required and the JSON version is
optional, you don't get to pick between the two. This will be clarified
in version 1.1.2 of XEP-0156: https://github.com/xsf/xeps/pull/198
Add a bug comment to the BOSH/Websocket lookup
Add a waitgroup around two goroutines
Actually wait on the wait group…
Rename lookupConn to lookupEndpoint
Use context package compatible with Go 1.6
Add exported function to lookup BOSH endpoints.
Add exported func to lookup websocket endpoints.
Make lookupWebsocketDNS cancelable
Add host-meta file lookup
Start adding lookup helper methods