public final class Socks5ByteStreamManager extends ByteStreamManager
This class starts a local SOCKS5 server to support direct connections between two entities. You can set a port of this local server, if you don't set a port, the default port 1080 is used.
It also allows you to initiate a byte stream session with another entity.
| Modifier and Type | Method and Description |
|---|---|
List<StreamHost> |
discoverProxies()
Discovers the SOCKS5 proxies.
|
List<StreamHost> |
getAvailableStreamHosts()
Gets a list of available stream hosts, including the discovered proxies and the local host.
|
int |
getPort()
Gets the port of the local host.
|
ByteStreamSession |
initiateSession(Jid target,
String sessionId)
Initiates a SOCKS5 session with a target.
|
boolean |
isLocalHostEnabled()
Indicates whether the local host is enabled.
|
void |
setEnabled(boolean enabled)
Enables or disables support for the extension.
|
void |
setLocalHostEnabled(boolean enabled)
Enables or disables the use of a local SOCKS5 host.
|
void |
setPort(int port)
Sets the port of the local host.
|
addByteStreamListener, removeByteStreamListenerisEnabledpublic boolean isLocalHostEnabled()
public void setLocalHostEnabled(boolean enabled)
enabled - If enabled.public int getPort()
public void setPort(int port)
port - The port.public void setEnabled(boolean enabled)
ExtensionManagersetEnabled in class ExtensionManagerenabled - True, if support for the managed extension should be enabled; otherwise false.ExtensionManager.isEnabled()public List<StreamHost> discoverProxies() throws XmppException
StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.XmppExceptionpublic List<StreamHost> getAvailableStreamHosts() throws IOException
IOException - If not stream hosts could be found.public ByteStreamSession initiateSession(Jid target, String sessionId) throws XmppException, IOException
target - The target.sessionId - The session id.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.IOException - If the byte stream session could not be established.XmppExceptionCopyright © 2014–2015 XMPP.rocks. All rights reserved.