WebSocketFrame

Provides factory for WebSocketFrame.

Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(isFinal: Boolean, isCompressed: Boolean, opcode: Opcode, key: Option[MaskingKey], length: Long, payload: InputStream): WebSocketFrame

Creates WebSocket frame using supplied attributes.

Creates WebSocket frame using supplied attributes.

Value Params
isCompressed

indicates compression

isFinal

indicates final frame of message

key

masking key

length

payload length

opcode

frame opcode

payload

input stream to payload

def apply(isFinal: Boolean, isCompressed: Boolean, opcode: Opcode, key: Option[MaskingKey], length: Int, data: Array[Byte]): WebSocketFrame

Creates WebSocket frame using supplied attributes.

Creates WebSocket frame using supplied attributes.

Value Params
data

unmasked payload data

isCompressed

indicates compression

isFinal

indicates final frame of message

key

masking key

length

payload length

opcode

frame opcode

Note

If there is Some masking key, it is used to mask data.

def apply(isFinal: Boolean, isCompressed: Boolean, opcode: Opcode, key: Option[MaskingKey], data: Array[Byte]): WebSocketFrame

Creates WebSocket frame using supplied attributes.

Creates WebSocket frame using supplied attributes.

Value Params
data

unmasked payload data

isCompressed

indicates compression

isFinal

indicates final frame of message

key

masking key

opcode

frame opcode

Note

If there is Some masking key, it is used to mask data.

def apply(statusCode: StatusCode, key: Option[MaskingKey]): WebSocketFrame

Creates Close frame using supplied status code.

Creates Close frame using supplied status code.

Value Params
key

masking key

statusCode

status code to serve as payload

Note

If there is Some masking key, it is used to mask status code.