Class: Screen

Protocol~Message~Screen

new Screen(protocol, websocket)

Name Type Description
protocol Protocol

A provider of the web protocol API.

websocket object

instance

Extends

Requires

Members

inherited buffer arrayBuffer

inherited channel string

inherited connected boolean

inherited continuous boolean

inherited debug boolean

inherited socket object

inherited url string

useBlobURL boolean

useWorker boolean

Type Definitions

inherited protocol Protocol

A provider of the web protocol API.

inherited translator object

worker WebWorker

Create a web worker for arraybuffer unpack

Methods

inherited getHeaderSize(){number}

Returns:
Type Description
number size of header

inherited pack(payloadType, messageId, body){Struct}

Packaging the RC data struct.

Name Type Description
payloadType number

Payload type of packet.

messageId number

Message id of packet.

body Struct optional

Struct of body.

TODO
  • 로컬 채널의 경우에는 패킷 랭스를 보게 되어 있어서 바디가 없는 경우 dataSize를 빼면 오류(추후 수정)
Returns:
Type Description
Struct Struct of RC packet.
Name Type Description
chunk arrayBuffer

response(channel, payload, data)

Name Type Description
channel string

The name of channel of socket.

payload object
data object

inherited send(payloadType, messageId, data, unionId){object.<string, object>}

Name Type Description
payloadType number
messageId number
data object optional
unionId number optional
Returns:
Type Description
object.<string, object> sended packet
Name Type Description
chunk arrayBuffer

unpack(buffer){object}

Name Type Description
buffer arrayBuffer
Returns:
Type Description
object payload with unpacked data
comments powered by Disqus