SocketApp

zio.http.socket.SocketApp
See theSocketApp companion object
final case class SocketApp[-R](decoder: SocketDecoder, protocol: SocketProtocol, message: Option[ChannelEvent[WebSocketFrame, WebSocketFrame] => ZIO[R, Throwable, Any]])

Attributes

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

Members list

Concise view

Value members

Concrete methods

def connect(url: String, headers: Headers)(implicit trace: Trace): ZIO[R & Client & Scope, Throwable, Response]

Creates a socket connection on the provided URL. Typically used to connect as a client.

Creates a socket connection on the provided URL. Typically used to connect as a client.

Attributes

def provideEnvironment(env: ZEnvironment[R])(implicit trace: Trace): SocketApp[Any]

Provides the socket app with its required environment, which eliminates its dependency on R.

Provides the socket app with its required environment, which eliminates its dependency on R.

Attributes

def toHandler(implicit trace: Trace): Handler[R, Nothing, Any, Response]

Converts the socket app to a HTTP app.

Converts the socket app to a HTTP app.

Attributes

def toResponse(implicit trace: Trace): ZIO[R, Nothing, Response]

Creates a new response from the socket app.

Creates a new response from the socket app.

Attributes

def toRoute(implicit trace: Trace): Http[R, Nothing, Any, Response]

Frame decoder configuration

Frame decoder configuration

Attributes

Server side websocket configuration

Server side websocket configuration

Attributes

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product