dwrtc / ch.hsr.dsl.dwrtc.signaling / InternalClient

InternalClient

class InternalClient : IInternalClient

Represents the own user.

Types

Companion

companion object Companion : KLogging

Logging companion

Constructors

<init>

InternalClient(peer: PeerDHT, clientService: ClientService, sessionId: String)

Represents the own user.

Properties

clientService

val clientService: ClientService

the ClientService

peer

val peer: PeerDHT

the TomP2P peer object

sessionId

val sessionId: String

the user's session ID

Functions

equals

fun equals(other: Any?): Boolean

equals

hashCode

fun hashCode(): Int

hashcode

onReceiveMessage

fun onReceiveMessage(emitter: (IExternalClient, ClientMessage) -> Unit): Unit

Register a listener that handles messages for this user

sendMessage

fun sendMessage(type: String, messageBody: String, recipient: IExternalClient): Future

Send a message to an external user.

toString

fun toString(): String