Java client library for bytesocks.
Repo: https://oss.sonatype.org/content/repositories/snapshots/
Artifact: me.lucko:bytesocks-java-client:1.0-SNAPSHOT
// Create a client
String host = "bytesocks.example.com";
String userAgent = "github.com/example/your-application";
BytesocksClient client = BytesocksClientFactory.newClient(host, userAgent);
// create a new socket connection
BytesocksClient.Listener listener = new BytesocksClient.Listener() {
@Override
public void onText(String data) {
System.out.println("Got data from channel: " + data);
}
};
BytesocksClient.Socket socket = client.createAndConnect(listener);
System.out.println("Now connected to channel " + socket.getChannelId());
// Send a message to the channel
socket.send("Hello!");