close

open override fun close()

Blocking AutoCloseable bridge to closeSession, for callers outside a coroutine.

Coroutine code must call closeSession instead, typically in a finally, and nothing should call this from a main thread, because it blocks until the graceful close finishes. Unlike the GenAI SDK's LiveSession.close(), which cancels the socket abruptly, this closes gracefully.