Packages

sealed abstract class WebSocketBuilder[F[_]] extends AnyRef

Build a response which will accept an HTTP websocket upgrade request and initiate a websocket connection using the supplied exchange to process and respond to websocket messages.

Source
WebSocketBuilder.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WebSocketBuilder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def build(send: Stream[F, WebSocketFrame], receive: Pipe[F, WebSocketFrame, Unit]): F[Response[F]]

    send

    The send side of the Exchange represents the outgoing stream of messages that should be sent to the client

    receive

    The receive side of the Exchange is a sink to which the framework will push the incoming websocket messages Once both streams have terminated, the server will initiate a close of the websocket connection. As defined in the websocket specification, this means the server will send a CloseFrame to the client and wait for a CloseFrame in response before closing the connection, this ensures that no messages are lost in flight. The server will shutdown the connection when it receives the CloseFrame message back from the client. The connection will also be closed if the client does not respond with a CloseFrame after some reasonable amount of time. Another way of closing the connection is by emitting a CloseFrame in the stream of messages heading to the client. This method allows one to attach a message to the CloseFrame as defined by the websocket protocol. Unfortunately the current implementation does not quite respect the description above, it violates the websocket protocol by terminating the connection immediately upon reception of a CloseFrame. This bug will be addressed soon in an upcoming release and this message will be removed. Currently, there is no way for the server to be notified when the connection is closed, neither in the case of a normal disconnection such as a Close handshake or due to a connection error. There are plans to address this limitation in the future.

  6. def build(sendReceive: Pipe[F, WebSocketFrame, WebSocketFrame]): F[Response[F]]

    sendReceive

    The send-receive stream represents transforming of incoming messages to outgoing for a single websocket Once the stream have terminated, the server will initiate a close of the websocket connection. As defined in the websocket specification, this means the server will send a CloseFrame to the client and wait for a CloseFrame in response before closing the connection, this ensures that no messages are lost in flight. The server will shutdown the connection when it receives the CloseFrame message back from the client. The connection will also be closed if the client does not respond with a CloseFrame after some reasonable amount of time. Another way of closing the connection is by emitting a CloseFrame in the stream of messages heading to the client. This method allows one to attach a message to the CloseFrame as defined by the websocket protocol. Unfortunately the current implementation does not quite respect the description above, it violates the websocket protocol by terminating the connection immediately upon reception of a CloseFrame. This bug will be addressed soon in an upcoming release and this message will be removed. Currently, there is no way for the server to be notified when the connection is closed, neither in the case of a normal disconnection such as a Close handshake or due to a connection error. There are plans to address this limitation in the future.

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def imapK[G[_]](fk: ~>[F, G])(gk: ~>[G, F])(implicit arg0: Applicative[G]): WebSocketBuilder[G]

    Transform the parameterized effect from F to G.

  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  23. def withFilterPingPongs(filterPingPongs: Boolean): WebSocketBuilder[F]
  24. def withHeaders(headers: Headers): WebSocketBuilder[F]
  25. def withOnClose(onClose: F[Unit]): WebSocketBuilder[F]
  26. def withOnHandshakeFailure(onHandshakeFailure: F[Response[F]]): WebSocketBuilder[F]
  27. def withOnNonWebSocketRequest(onNonWebSocketRequest: F[Response[F]]): WebSocketBuilder[F]

Inherited from AnyRef

Inherited from Any

Ungrouped