Scoop API

scoop:scoop.tls:0.1.0

TlsStream

class TlsStream

source · line 14
public
public class TlsStream internal constructor(private val pump: SyncPump, private val owner: Closeable) : ByteSource, ByteSink, Closeable

A synchronous TLS byte stream that owns its transport and native TLS state. Construction completes the handshake. Operations must not overlap.

close releases local resources; shutdownGracefully exchanges TLS close notifications before closing the transport. A failed I/O operation closes owned resources.

function close

source · line 135
public
public override fun close(): Unit

Closes the owned transport and releases local state without performing a TLS close handshake. It rejects an overlapping stream operation.

function flush

source · line 92
public
public override fun flush(): Unit

Drains pending TLS ciphertext and flushes the underlying byte sink.

function shutdownGracefully

source · line 104
public
public fun shutdownGracefully(): Unit

Completes the TLS close handshake, then closes the owned transport and local state. Use this when the peer must receive an orderly TLS shutdown.