ExtensionSession

An extension's handle on one link: everything it sends goes through the registry's checks.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val version: Int?

The agreed major version, or null when the peer did not announce one this build speaks.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun reply(to: Message, b: JSONObject, t: String = to.t): Boolean

The answer to to (which carried an id); allowed even when the peer announced nothing.

Link copied to clipboard
fun request(t: String, b: JSONObject = JSONObject()): Int?

A request (with id); the answer, or an error with re, arrives in onMessage. Returns the id, null when not sent.

Link copied to clipboard
fun send(t: String, b: JSONObject = JSONObject()): Boolean

An unsolicited message; only to a peer that agreed a version. False when not sent.