play.api.http.websocket

Members list

Type members

Classlikes

case class BinaryMessage(data: ByteString) extends Message

A binary message.

A binary message.

Value parameters

data

The data of the binary message.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Message
class Object
trait Matchable
class Any
Show all
object CloseCodes

WebSocket close codes

WebSocket close codes

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
CloseCodes.type
case class CloseMessage(statusCode: Option[Int], reason: String) extends Message

A close message.

A close message.

Value parameters

reason

The reason it was closed.

statusCode

The close status code.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Message
class Object
trait Matchable
class Any
Show all
object CloseMessage

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait Message

A WebSocket message.

A WebSocket message.

This is a high level API intended for common simple use cases. It allows handling and sending of full WebSocket messages, as well as close and ping/pong messages. It will buffer fragmented messages up until a limit, and does not allow streaming in fragments.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class PingMessage(data: ByteString) extends Message

A ping message.

A ping message.

Value parameters

data

The application data.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Message
class Object
trait Matchable
class Any
Show all
case class PongMessage(data: ByteString) extends Message

A pong message.

A pong message.

Value parameters

data

The application data.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Message
class Object
trait Matchable
class Any
Show all
case class TextMessage(data: String) extends Message

A text message.

A text message.

Value parameters

data

The data of the text message.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Message
class Object
trait Matchable
class Any
Show all
case class WebSocketCloseException(message: CloseMessage) extends RuntimeException

An exception that, if thrown by a WebSocket source, will cause the WebSocket to be closed with the given close message. This is a convenience that allows the WebSocket to close with a particular close code without having to produce generic Messages.

An exception that, if thrown by a WebSocket source, will cause the WebSocket to be closed with the given close message. This is a convenience that allows the WebSocket to close with a particular close code without having to produce generic Messages.

Attributes

Supertypes
trait Product
trait Equals
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all