Class: Local

Protocol~Message~Local

new Local(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

Type Definitions

inherited protocol Protocol

A provider of the web protocol API.

inherited translator object

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
packet arrayBuffer

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

inherited unpack(packet, payload){object}

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