public class Socks5ClientForInitiator extends Socks5Client
digest, streamHost
Constructor and Description |
---|
Socks5ClientForInitiator(Bytestream.StreamHost streamHost,
java.lang.String digest,
org.jivesoftware.smack.XMPPConnection connection,
java.lang.String sessionID,
org.jxmpp.jid.Jid target)
Creates a new SOCKS5 client for the initiators side.
|
Modifier and Type | Method and Description |
---|---|
java.net.Socket |
getSocket(int timeout)
Returns the initialized socket that can be used to transfer data between peers via the SOCKS5
proxy.
|
establish
public Socks5ClientForInitiator(Bytestream.StreamHost streamHost, java.lang.String digest, org.jivesoftware.smack.XMPPConnection connection, java.lang.String sessionID, org.jxmpp.jid.Jid target)
streamHost
- containing network settings of the SOCKS5 proxydigest
- identifying the SOCKS5 Bytestreamconnection
- the XMPP connectionsessionID
- the session ID of the SOCKS5 Bytestreamtarget
- the target JID of the SOCKS5 Bytestreampublic java.net.Socket getSocket(int timeout) throws java.io.IOException, java.lang.InterruptedException, java.util.concurrent.TimeoutException, org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException.SmackMessageException, org.jivesoftware.smack.SmackException.NotConnectedException, org.jivesoftware.smack.SmackException.NoResponseException
Socks5Client
getSocket
in class Socks5Client
timeout
- timeout to connect to SOCKS5 proxy in millisecondsjava.io.IOException
- if initializing the socket failed due to a network errorjava.lang.InterruptedException
- if the current thread was interrupted while waitingjava.util.concurrent.TimeoutException
- if connecting to SOCKS5 proxy timed outorg.jivesoftware.smack.XMPPException
- if an XMPP protocol error was received.org.jivesoftware.smack.SmackException.SmackMessageException
- if there was an error.org.jivesoftware.smack.SmackException.NotConnectedException
- if the XMPP connection is not connected.org.jivesoftware.smack.SmackException.NoResponseException
- if there was no response from the remote entity.