LauncherClient

class LauncherClient(val host: String = "127.0.0.1", val port: Int = 13297, val token: String? = null, tokenProvider: () -> String? = null) : AutoCloseable

Client for the Tribot Launcher's public WebSocket API.

Provides strongly-typed access to account, proxy, and client management, as well as client function invocation and event subscription.

Usage:

val client = LauncherClient()
client.connect()

val accounts = client.accounts.list()
val proxies = client.proxies.list()
val running = client.clients.list()

client.onClientEvent { event ->
println("Event from ${event.clientId}: ${event.eventName}")
}

client.close()

Constructors

Link copied to clipboard
constructor(host: String = "127.0.0.1", port: Int = 13297, token: String? = null, tokenProvider: () -> String? = null)

Types

Link copied to clipboard
inner class Accounts
Link copied to clipboard
inner class Clients
Link copied to clipboard
object Companion
Link copied to clipboard
inner class Machines
Link copied to clipboard
inner class Proxies

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val port: Int
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun connect()
Link copied to clipboard
fun onClientEvent(listener: (ClientEvent) -> Unit)
Link copied to clipboard
fun onClientsUpdated(listener: (List<ClientInfo>) -> Unit)
Link copied to clipboard
fun onDisconnected(listener: (Throwable?) -> Unit)
Link copied to clipboard
fun onReconnected(listener: () -> Unit)