org/extensions/xep-0065.html">XEP-0065.
A SOCKS5 Bytestream is negotiated partly over the XMPP XML stream and partly over a separate socket. The actual transfer though takes place over a separately created socket.
A SOCKS5 Bytestream generally has three parties, the initiator, the target, and the stream host. The stream host is a specialized SOCKS5 proxy setup on a server, or, the initiator can act as the stream host.
To establish a SOCKS5 Bytestream invoke the {@link #establishSession(String)} method. This willnegotiate a SOCKS5 Bytestream with the given target JID and return a socket.
If a session ID for the SOCKS5 Bytestream was already negotiated (e.g. while negotiating a file transfer) invoke {@link #establishSession(String,String)}.
To handle incoming SOCKS5 Bytestream requests add an {@link Socks5BytestreamListener} to themanager. There are two ways to add this listener. If you want to be informed about incoming SOCKS5 Bytestreams from a specific user add the listener by invoking {@link #addIncomingBytestreamListener(BytestreamListener,String)}. If the listener should respond to all SOCKS5 Bytestream requests invoke {@link #addIncomingBytestreamListener(BytestreamListener)}.
Note that the registered {@link Socks5BytestreamListener} will NOT be notified on incoming Socks5bytestream requests sent in the context of XEP-0096 file transfer. (See {@link FileTransferManager})
If no {@link Socks5BytestreamListener}s are registered, all incoming SOCKS5 Bytestream requests will be rejected by returning a <not-acceptable/> error to the initiator.
@author Henning Staib