ZapServer

open class ZapServer

A server that receives data from client.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun listen(port: Int = DEFAULT_PORT)

Start listening the transmitted data from clients on the given port.

Link copied to clipboard

A callback function called whenever accelerometer data is received.

Link copied to clipboard
open fun onGeoPointReceived(info: MetaInfo, data: ZapGeoPoint)

A callback function called whenever geological point is received.

Link copied to clipboard
open fun onGravityReceived(info: MetaInfo, data: ZapGravity)

A callback function called whenever gravity data is received.

Link copied to clipboard

A callback function called whenever gyroscope data is received.

Link copied to clipboard

A callback function called whenever illuminance data is received.

Link copied to clipboard

A callback function called whenever magnetic field data is received.

Link copied to clipboard
open fun onTextReceived(info: MetaInfo, data: ZapText)

A callback function called whenever text data is received.

Link copied to clipboard
open fun onUIEventReceived(info: MetaInfo, data: ZapUiEvent)

A callback function called whenever UI event data is received.

Link copied to clipboard
fun stop()

Stop listening to clients.