Packages

object WebSocket

Source
WebSocket.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WebSocket
  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 client[F[_], I, O](request: WebSocketRequest, pipe: Pipe[F, Frame[I], Frame[O]], maxHeaderSize: Int = 4096, receiveBufferSize: Int = 256 * 1024, maxFrameSize: Int = 1024*1024, requestCodec: Codec[HttpRequestHeader] = HttpRequestHeaderCodec.defaultCodec, responseCodec: Codec[HttpResponseHeader] = ..., sslStrategy: ⇒ Strategy = ..., sslContext: ⇒ SSLContext = ...)(implicit R: Decoder[I], W: Encoder[O], AG: AsynchronousChannelGroup, F: Async[F], S: Scheduler): Stream[F, Option[HttpResponseHeader]]

    Establishes websocket connection to the server.

    Establishes websocket connection to the server.

    Implementation is according to RFC-6455 (https://tools.ietf.org/html/rfc6455).

    If this is established successfully, then this consults pipe to receive/sent any frames From/To server. Once the connection finishes, this will emit once None.

    If the connection was not established correctly (i.e. Authorization failure) this will not consult supplied pipe and instead this will immediately emit response received from the server.

    request

    WebSocket request

    pipe

    Pipe that is consulted when websocket is established correctly

    maxHeaderSize

    Max size of Http Response header received

    receiveBufferSize

    Size of receive buffer to use

    maxFrameSize

    Maximum size of single websocket frame. If the binary size of single frame is larger than supplied value, websocket will fail.

    requestCodec

    Codec to encode HttpRequests Header

    responseCodec

    Codec to decode HttpResponse Header

  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  16. def server[F[_], I, O](pipe: Pipe[F, Frame[I], Frame[O]], pingInterval: Duration = 30.seconds, handshakeTimeout: FiniteDuration = 10.seconds, maxFrameSize: Int = 1024*1024)(header: HttpRequestHeader, input: Stream[F, Byte])(implicit R: Decoder[I], W: Encoder[O], F: Async[F], S: Scheduler): Stream[F, HttpResponse[F]]

    Creates a websocket to be used on server side.

    Creates a websocket to be used on server side.

    Implementation is according to RFC-6455 (https://tools.ietf.org/html/rfc6455).

    pipe

    A websocket pipe. I is received from the client and O is sent to client. Decoder (for I) and Encoder (for O) must be supplied.

    pingInterval

    An interval for the Ping / Pong protocol.

    handshakeTimeout

    An timeout to await for handshake to be successfull. If the handshake is not completed within supplied period, connection is terminated.

    maxFrameSize

    Maximum size of single websocket frame. If the binary size of single frame is larger than supplied value, websocket will fail.

  17. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. object impl

Inherited from AnyRef

Inherited from Any

Ungrouped