public class SocketUtil extends Object
Constructor and Description |
---|
SocketUtil() |
Modifier and Type | Method and Description |
---|---|
static Socket |
createSocketToXmppDomain(String xmppDomain,
int port)
Creates a socket connection to an XMPP domain.
|
public static Socket createSocketToXmppDomain(String xmppDomain, int port)
DNSUtil.resolveXMPPDomain(String, int)
. It then iteratively tries to create a socket connection to each
of them, until one socket connection succeeds.
Either the connected Socket instance is returned, or null if no connection could be established.
Note that this method blocks while performing network IO. The timeout as defined by
RemoteServerManager.getSocketTimeout()
is observed.xmppDomain
- The XMPP domain to connect to.port
- The port to connect to when DNS resolution fails.DNSUtil.resolveXMPPDomain(String, int)
Copyright © 2003-2008 Jive Software.