InMemoryMessageStream

A message stream side; every message arrives whole, as a WebSocket frame.

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 receive(): ByteArray?
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 suspend override fun send(message: ByteArray)
Link copied to clipboard
open override fun toString(): String