/// <summary>
        /// Queries the client's server for a list of SOCKS5 proxies.
        /// </summary>
        /// <returns>An enumerable collection of SOCKS5 proxies available to
        /// the client.</returns>
        /// <exception cref="NotSupportedException">The client's XMPP server
        /// does not support querying for proxy information.</exception>
        /// <exception cref="XmppErrorException">The server returned an XMPP error code.
        /// Use the Error property of the XmppErrorException to obtain the specific
        /// error condition.</exception>
        /// <exception cref="XmppException">The server returned invalid data or another
        /// unspecified XMPP error occurred.</exception>
        IEnumerable <Streamhost> GetProxyList()
        {
            ISet <Streamhost> set = new HashSet <Streamhost>();

            foreach (var item in sdisco.GetItems(im.Jid.Domain))
            {
                // Query each item for its identities and look for a 'proxy' identity.
                foreach (var ident in sdisco.GetIdentities(item.Jid))
                {
                    // It's a SOCKS5 proxy.
                    if (ident.Category == "proxy" && ident.Type == "bytestreams")
                    {
                        // Get the full network address.
                        var address = GetNetworkAddress(item.Jid);
                        set.Add(address);
                    }
                }
            }
            return(set);
        }