Socket

sealed trait Socket[-R, +E, -A, +B]
Companion:
object
class Object
trait Matchable
class Any
Socket[R, E, A, B]

Value members

Concrete methods

def <>[R1 <: R, E1, A1 <: A, B1 >: B](other: Socket[R1, E1, A1, B1]): Socket[R1, E1, A1, B1]
def apply(a: A): ZStream[R, E, B]
def connect(url: String)(implicit ev: IsWebSocket[R, E, A, B]): ZManaged[R & EventLoopGroup & ChannelFactory, Throwable, Response]
def contramap[Z](za: Z => A): Socket[R, E, Z, B]
def contramapZIO[R1 <: R, E1 >: E, Z](za: Z => ZIO[R1, E1, A]): Socket[R1, E1, Z, B]
def delay(duration: Duration): Socket[Clock & R, E, A, B]

Delays delivery of messages by the specified duration.

Delays delivery of messages by the specified duration.

def map[C](bc: B => C): Socket[R, E, A, C]
def mapZIO[R1 <: R, E1 >: E, C](bc: B => ZIO[R1, E1, C]): Socket[R1, E1, A, C]
def merge[R1 <: R, E1 >: E, A1 <: A, B1 >: B](other: Socket[R1, E1, A1, B1]): Socket[R1, E1, A1, B1]
def orElse[R1 <: R, E1, A1 <: A, B1 >: B](other: Socket[R1, E1, A1, B1]): Socket[R1, E1, A1, B1]
def provideEnvironment(r: R)(implicit env: NeedsEnv[R]): Socket[Any, E, A, B]

Provides the socket with its required environment, which eliminates its dependency on R. This operation assumes that your socket requires an environment.

Provides the socket with its required environment, which eliminates its dependency on R. This operation assumes that your socket requires an environment.

def tap[R1 <: R, E1 >: E](f: B => ZIO[R1, E1, Any]): Socket[R1, E1, A, B]

Executes the effect for each message received from the socket, and ignores the output produced.

Executes the effect for each message received from the socket, and ignores the output produced.

def toHttp(implicit ev: IsWebSocket[R, E, A, B]): Http[R, E, Any, Response]

Converts the Socket into an Http

Converts the Socket into an Http

def toResponse(implicit ev: IsWebSocket[R, E, A, B]): ZIO[R, Nothing, Response]

Creates a response from the socket.

Creates a response from the socket.

def toSocketApp(implicit ev: IsWebSocket[R, E, A, B]): SocketApp[R]

Creates a socket application from the socket.

Creates a socket application from the socket.