InMemoryByteStream

A byte stream side; writes arrive in pieces of at most the chunk size.

Properties

Link copied to clipboard
open override val isAccepted: Boolean

Whether this is the side a listener accepted.

Link copied to clipboard
open override val isClosed: Boolean

Whether either side closed or reset the connection.

Link copied to clipboard
open override val peerIdentity: PeerIdentity
Link copied to clipboard
open override val remote: Endpoint

The other side's address.

Functions

Link copied to clipboard
open suspend override fun close()
Link copied to clipboard
open override fun inject(bytes: ByteArray)

Hands bytes to this side as if its peer had written them, for malformed or hand-made messages.

Link copied to clipboard
open suspend override fun read(into: ByteArray, offset: Int, length: Int): Int
Link copied to clipboard
open override fun reset()

Breaks the connection at once in both directions; reading then fails with InMemoryConnectionReset.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open suspend override fun write(bytes: ByteArray)