TestChannel

zio.http.TestChannel
See theTestChannel companion object
case class TestChannel(counterpartEvents: Queue[Event[WebSocketFrame]]) extends WebSocketChannel

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

override def autoRead(flag: Boolean)(implicit trace: Trace): UIO[Unit]

When set to true (default) it will automatically read messages from the channel. When set to false, the channel will not read messages until read is called.

When set to true (default) it will automatically read messages from the channel. When set to false, the channel will not read messages until read is called.

Attributes

Definition Classes
override def awaitClose(implicit trace: Trace): UIO[Unit]

Provides a way to wait for the channel to be closed.

Provides a way to wait for the channel to be closed.

Attributes

Definition Classes
override def close(await: Boolean)(implicit trace: Trace): Task[Unit]

Closes the channel. Pass true to await to wait for the channel to be closed.

Closes the channel. Pass true to await to wait for the channel to be closed.

Attributes

Definition Classes
override def contramap[A1](f: A1 => WebSocketFrame): Channel[A1]

Creates a new channel that can write a different type of message by using a transformation function.

Creates a new channel that can write a different type of message by using a transformation function.

Attributes

Definition Classes
override def flush(implicit trace: Trace): Task[Unit]

Flushes the pending write operations on the channel.

Flushes the pending write operations on the channel.

Attributes

Definition Classes
override def id(implicit trace: Trace): String

Returns the globally unique identifier of this channel.

Returns the globally unique identifier of this channel.

Attributes

Definition Classes
override def isAutoRead(implicit trace: Trace): UIO[Boolean]

Returns true if auto-read is set to true.

Returns true if auto-read is set to true.

Attributes

Definition Classes
def pending(implicit trace: Trace): UIO[Event[WebSocketFrame]]
override def read(implicit trace: Trace): UIO[Unit]

Schedules a read operation on the channel. This is not necessary if auto-read is enabled.

Schedules a read operation on the channel. This is not necessary if auto-read is enabled.

Attributes

Definition Classes
override def write(msg: WebSocketFrame, await: Boolean)(implicit trace: Trace): Task[Unit]

Schedules a write operation on the channel. The actual write only happens after calling flush. Pass true to await the completion of the write operation.

Schedules a write operation on the channel. The actual write only happens after calling flush. Pass true to await the completion of the write operation.

Attributes

Definition Classes
override def writeAndFlush(msg: WebSocketFrame, await: Boolean)(implicit trace: Trace): Task[Unit]

Writes and flushes the message on the channel. Pass true to await the completion of the write operation.

Writes and flushes the message on the channel. Pass true to await the completion of the write operation.

Attributes

Definition Classes

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Concrete fields