Packages

trait WebSocketSession extends AnyRef

Defines session for WebSocket connection.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WebSocketSession
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def close(code: StatusCode = NormalClosure): Unit

    Closes session with supplied status code.

    Closes session with supplied status code.

    code

    status code of closure

  2. abstract def id: String

    Gets session identifer.

  3. abstract def idleTimeout(milliseconds: Int): WebSocketSession.this.type

    Sets WebSocket idle timeout.

    Sets WebSocket idle timeout.

    Timeout of zero disables this option – i.e., timeout is indefinite.

    milliseconds

    idle timeout

    returns

    this session

    Note

    If no activity transpires for specified duration, then session is closed with status code GoingAway.

  4. abstract def idleTimeout: Int

    Gets WebSocket idle timeout in milliseconds.

    Gets WebSocket idle timeout in milliseconds.

    Timeout of zero disables this option – i.e., timeout is indefinite.

    Note

    If no activity transpires for specified duration, then session is closed with status code GoingAway.

  5. abstract def isSecure: Boolean

    Tests for secure WebSocket session.

  6. abstract def logger: Logger

    Gets logger associated with session.

  7. abstract def messageCapacity(size: Int): WebSocketSession.this.type

    Sets capacity of incoming message.

    Sets capacity of incoming message.

    size

    message capacity in bytes

    returns

    this session

    Note

    If message exceeds specified capacity, then session is closed with status code MessageTooBig.

  8. abstract def messageCapacity: Int

    Gets capacity of incoming message.

    Gets capacity of incoming message.

    Note

    If message exceeds specified capacity, then session is closed with status code MessageTooBig.

  9. abstract def onBinary[T](handler: (Array[Byte]) ⇒ T): WebSocketSession.this.type

    Sets handler for incoming binary message.

    Sets handler for incoming binary message.

    handler

    binary message handler

    returns

    this session

  10. abstract def onClose[T](handler: (StatusCode) ⇒ T): WebSocketSession.this.type

    Sets handler to be notified when session closes.

    Sets handler to be notified when session closes.

    handler

    close handler

    returns

    this session

  11. abstract def onError[T](handler: (Throwable) ⇒ T): WebSocketSession.this.type

    Sets handler to be notified when session error occurs.

    Sets handler to be notified when session error occurs.

    handler

    error handler

    returns

    this session

  12. abstract def onPing[T](handler: (Array[Byte]) ⇒ T): WebSocketSession.this.type

    Sets handler for incoming ping message.

    Sets handler for incoming ping message.

    handler

    ping message handler

    returns

    this session

  13. abstract def onPong[T](handler: (Array[Byte]) ⇒ T): WebSocketSession.this.type

    Sets handler for incoming pong message.

    Sets handler for incoming pong message.

    handler

    pong message handler

    returns

    this session

  14. abstract def onText[T](handler: (String) ⇒ T): WebSocketSession.this.type

    Sets handler for incoming text message.

    Sets handler for incoming text message.

    handler

    text message handler

    returns

    this session

  15. abstract def open(): Unit

    Opens session.

    Opens session.

    Note

    This method becomes an effective no-op if invoked more than once.

  16. abstract def payloadLimit(length: Int): WebSocketSession.this.type

    Gets payload limit of outgoing message.

    Gets payload limit of outgoing message.

    length

    payload limit in bytes

    returns

    this session

    Note

    If outgoing message exceeds specified limit, then message is sent over multiple frames.

  17. abstract def payloadLimit: Int

    Gets payload limit of outgoing message.

    Gets payload limit of outgoing message.

    Note

    If outgoing message exceeds specified limit, then message is sent over multiple frames.

  18. abstract def ping(data: Array[Byte] = Array.empty): Unit

    Sends ping message.

    Sends ping message.

    data

    application data to accompany ping message

  19. abstract def pingAsync[T](data: Array[Byte] = Array.empty): Future[Unit]

    Sends ping message asynchronously and on completion passes result to supplied callback.

    Sends ping message asynchronously and on completion passes result to supplied callback.

    data

    application data to accompany ping message

  20. abstract def pong(data: Array[Byte] = Array.empty): Unit

    Sends pong message.

    Sends pong message.

    data

    application data to accompany pong message

  21. abstract def pongAsync[T](data: Array[Byte] = Array.empty): Future[Unit]

    Sends pong message asynchronously and on completion passes result to supplied callback.

    Sends pong message asynchronously and on completion passes result to supplied callback.

    data

    application data to accompany pong message

  22. abstract def protocolVersion: String

    Gets WebSocket protocol version.

  23. abstract def send(message: InputStream, binary: Boolean = false): Unit

    Sends message.

    Sends message.

    If binary is true, then binary message is sent; otherwise, text message is sent.

    message

    input stream to message

    binary

    indicator for binary message

  24. abstract def send(message: Array[Byte]): Unit

    Sends binary message.

    Sends binary message.

    message

    binary message

  25. abstract def send(message: String): Unit

    Sends text message.

    Sends text message.

    message

    text message

  26. abstract def sendAsync[T](message: InputStream, binary: Boolean = false): Future[Unit]

    Sends message asynchronously and on completion passes result to supplied callback.

    Sends message asynchronously and on completion passes result to supplied callback.

    If binary is true, then binary message is sent; otherwise, text message is sent.

    message

    input stream to message

    binary

    indicator for binary message

  27. abstract def sendAsync[T](message: Array[Byte]): Future[Unit]

    Sends binary message asynchronously and on completion passes result to supplied callback.

    Sends binary message asynchronously and on completion passes result to supplied callback.

    message

    binary message

  28. abstract def sendAsync[T](message: String): Future[Unit]

    Sends text message asynchronously and on completion passes result to supplied callback.

    Sends text message asynchronously and on completion passes result to supplied callback.

    message

    text message

  29. abstract def state: SessionState

    Gets current state of WebSocket session.

  30. abstract def target: Uri

    Gets target of WebSocket request.

Concrete 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 clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped