ConnectivityServerServiceListener

interface ConnectivityServerServiceListener

Listener for service level events.

Functions

Link copied to clipboard
abstract fun onMessageReceived(    serviceConnectionId: ServiceConnectionId,     serviceUuid: ServiceUuid,     data: ByteArray): Boolean

Called when the client with the specified serviceConnectionId has sent a message with the specified data for the service with the specified serviceUuid. The implementation should return true when the messages received successfully or false otherwise.

Link copied to clipboard
abstract fun onServiceSubscribed(serviceConnectionId: ServiceConnectionId, serviceUuid: ServiceUuid)

Called when a client with the specified serviceConnectionId has subscribed to the service with the specified serviceUuid.

Link copied to clipboard
abstract fun onServiceUnsubscribed(serviceConnectionId: ServiceConnectionId, serviceUuid: ServiceUuid)

Called when a client with the specified serviceConnectionId has unsubscribed (and/or connection was lost) from the service with the specified serviceUuid.