StatusCode

scamper.http.websocket.StatusCode
See theStatusCode companion trait
object StatusCode

Provides factory methods and registry for StatusCode.

Attributes

See also
Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
StatusCode.type

Members list

Type members

Classlikes

object Registry

Contains registered WebSocket status codes.

Contains registered WebSocket status codes.

Attributes

Note

The status code descriptions are taken in part from those provided in RFC 6455.

Supertypes
class Object
trait Matchable
class Any
Self type
Registry.type

Value members

Concrete methods

def apply(value: Int): StatusCode

Gets registered status code for given value.

Gets registered status code for given value.

Attributes

Throws
java.util.NoSuchElementException

if value not registered

def apply(data: Array[Byte]): StatusCode

Gets registered status code for supplied data.

Gets registered status code for supplied data.

Attributes

Throws
java.lang.IllegalArgumentException

if data.size != 2

java.util.NoSuchElementException

if value not registered

Note

The data is converted to two-byte unsigned integer, which is then used to obtain status code.

def get(value: Int): Option[StatusCode]

Gets status code for given value, if registered.

Gets status code for given value, if registered.

Attributes

def get(data: Array[Byte]): Option[StatusCode]

Gets status code for supplied data, if registered.

Gets status code for supplied data, if registered.

Attributes

Note

The data is converted to two-byte unsigned integer, which is then used to obtain status code.