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.
|
establishpublic 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
Socks5ClientgetSocket in class Socks5Clienttimeout - 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.XMPPExceptionorg.jivesoftware.smack.SmackException - if the connection to the SOCKS5 proxy failed