Class Socks5ClientForInitiator
java.lang.Object
org.jivesoftware.smackx.bytestreams.socks5.Socks5Client
org.jivesoftware.smackx.bytestreams.socks5.Socks5ClientForInitiator
Implementation of a SOCKS5 client used on the initiators side. This is needed because connecting
to the local SOCKS5 proxy differs form the regular way to connect to a SOCKS5 proxy. Additionally
a remote SOCKS5 proxy has to be activated by the initiator before data can be transferred between
the peers.
-
Field Summary
Fields inherited from class org.jivesoftware.smackx.bytestreams.socks5.Socks5Client
digest, streamHost
-
Constructor Summary
ConstructorDescriptionSocks5ClientForInitiator
(Bytestream.StreamHost streamHost, String digest, XMPPConnection connection, String sessionID, Jid target) Creates a new SOCKS5 client for the initiators side. -
Method Summary
Methods inherited from class org.jivesoftware.smackx.bytestreams.socks5.Socks5Client
establish
-
Constructor Details
-
Socks5ClientForInitiator
public Socks5ClientForInitiator(Bytestream.StreamHost streamHost, String digest, XMPPConnection connection, String sessionID, Jid target) Creates a new SOCKS5 client for the initiators side.- Parameters:
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 Bytestream
-
-
Method Details
-
getSocket
public Socket getSocket(int timeout) throws IOException, InterruptedException, TimeoutException, XMPPException, SmackException.SmackMessageException, SmackException.NotConnectedException, SmackException.NoResponseException Description copied from class:Socks5Client
Returns the initialized socket that can be used to transfer data between peers via the SOCKS5 proxy.- Overrides:
getSocket
in classSocks5Client
- Parameters:
timeout
- timeout to connect to SOCKS5 proxy in milliseconds- Returns:
- socket the initialized socket
- Throws:
IOException
- if initializing the socket failed due to a network errorInterruptedException
- if the current thread was interrupted while waitingTimeoutException
- if connecting to SOCKS5 proxy timed outXMPPException
- if an XMPP protocol error was received.SmackException.SmackMessageException
- if there was an error.SmackException.NotConnectedException
- if the XMPP connection is not connected.SmackException.NoResponseException
- if there was no response from the remote entity.
-