Link

interface Link

A connection between two sites, over any transport (memory, the threads of a process, a socket): the frames sent on it arrive in the order they were sent, until it is closed

Properties

Link copied to clipboard
open val address: String?

The address of the other end, if known: the wrong codes of an address are refused for a while, after a few

Link copied to clipboard
open val code: String?

The code this site presents on a link it opened, to a site requiring one: none by default

Link copied to clipboard
open val outgoing: Boolean

Whether this site opened the link: a site requiring a code (see Site.requiresCode) checks the links it did not

Functions

Link copied to clipboard
abstract fun close()

Closes the link: both ends are told (see LinkListener.closed)

Link copied to clipboard
abstract fun send(frame: String)

Sends frame to the site at the other end, if the link is still open