class AnimationSender
AnimationSender(ipAddress: String, port: Int, connectAttemptLimit: Int) |
val connectAttemptLimit: Int |
|
var connected: Boolean |
|
var ipAddress: String |
|
val port: Int |
|
val runningAnimations: MutableMap<String, AnimationData> |
|
var started: Boolean |
fun end(): Unit
Stop this connection |
|
fun send(args: AnimationData): Unit
Send an animation via this connection |
|
fun setAsDefaultSender(): AnimationSender
Set this sender as the default sender |
|
fun setIPAddress(address: String): AnimationSender
Set this connection's IP address. Restarts connection if connected. |
|
fun setOnConnectCallback(action: () -> Unit): AnimationSender
Specify an action to perform when a connection is established |
|
fun setOnDisconnectCallback(action: () -> Unit): AnimationSender
Specify an action to perform when a connection is lost |
|
fun <R> setOnEndAnimationCallback(action: (AnimationData) -> R): AnimationSender
Specify an action to perform when an animation ending message is received from the server. Runs after onReceive callback. |
|
fun <R> setOnNewAnimationCallback(action: (AnimationData) -> R): AnimationSender
Specify an action to perform when an animation starting message is received from the server. Runs after onReceive callback. |
|
fun <R> setOnReceiveCallback(action: (AnimationData) -> R): AnimationSender
Specify an action to perform when data is received from the server |
|
fun start(): AnimationSender
Start this connection |