KetraTerm
API · DevelopmentAll versions

start

abstract fun start(listener: TerminalConnectorListener)

Starts delivering transport events to listener.

Implementations may call listener methods from transport-owned threads. A connector accepts at most one start attempt. Repeated starts, including after failure or closure, throw IllegalStateException without replacing the original listener or starting additional workers. Closing before start also prevents startup. Local close is idempotent. Startup and listener delivery must tolerate concurrent close. In particular, closing must not wait for a byte callback to return: it may be decoding an image. Synchronous listener delivery from this method must run off UI threads.

Parameters

listener

callback sink for transport events.

Throws

if already started or closed.