Class Socks5ClientForInitiator

java.lang.Object
org.jivesoftware.smackx.bytestreams.socks5.Socks5Client
org.jivesoftware.smackx.bytestreams.socks5.Socks5ClientForInitiator

public class Socks5ClientForInitiator extends Socks5Client
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.
  • Constructor Details

    • Socks5ClientForInitiator

      public Socks5ClientForInitiator(Bytestream.StreamHost streamHost, String digest, org.jivesoftware.smack.XMPPConnection connection, String sessionID, org.jxmpp.jid.Jid target)
      Creates a new SOCKS5 client for the initiators side.
      Parameters:
      streamHost - containing network settings of the SOCKS5 proxy
      digest - identifying the SOCKS5 Bytestream
      connection - the XMPP connection
      sessionID - the session ID of the SOCKS5 Bytestream
      target - the target JID of the SOCKS5 Bytestream
  • Method Details

    • getSocket

      public Socket getSocket(int timeout) throws IOException, InterruptedException, TimeoutException, org.jivesoftware.smack.XMPPException, org.jivesoftware.smack.SmackException.SmackMessageException, org.jivesoftware.smack.SmackException.NotConnectedException, org.jivesoftware.smack.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 class Socks5Client
      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 error
      InterruptedException - if the current thread was interrupted while waiting
      TimeoutException - if connecting to SOCKS5 proxy timed out
      org.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.