Class: Connect

Mobizen.Socket.Connect

new Mobizen.Socket.Connect(socket, params)

Name Type Description
socket Mobizen.Socket

A provider of Mobizen/Socket API.

params object
See:

Members

authtimeout

Pincode Timeout

channel string

readonly connectionTypes number

Properties:
Name Type Default Description
GATEWAY number 0
USB number 1
WIFI number 2
"3G" number 8
LTE number 16

dataHead Struct

The payload of message

Properties:
Name Type Description
type typed

uint8

messageSize typed

uint32

messageId typed

uint8

dataJSON Struct

Shared header of JSON type

Properties:
Name Type Description
json vary

uint16

dataLogin Struct

PayloadType 220 MessageId 51

Properties:
Name Type Description
deviceKey vary

uint16[, uint8]

model vary

uint16[, uint8]

RSPermState typed

uint16
200 installed
210 installable
404 unsupported

version typed

uint8

apkVersion vary

uint16[, uint8]

sdcardEnable typed

uint8

connectedType typed

uint32
0 NONE
2 WIFI
4 ??
8 3G
16 LTE

width typed

uint16

height typed

uint16

os typed

uint8

eulaState typed

uint8

usim typed

uint8
0 disable
1 enable

httpPort typed

uint16

softButton typed

uint8

DPI typed

uint32

HWNavigation typed

uint32

email vary

uint16[, uint8] - ADDED v2.16.x

See:

dataSize Struct

The data size of message

Properties:
Name Type Description
dataSize typed

uint32

disposeTime number

readonly gwSigs String

Properties:
Name Type Default Description
"10" String CONNECT
"20" String CONNACK
"192" String PINGREQ
"208" String PINGRES
"5" String WAITACK
"6" String WAITEND
"7" String WTF?

readonly gwStructBody Struct

Properties:
Name Type Description
guid vary

uint8[, uint32]

channel typed

uint32

product typed

uint32

version typed

uint32

readonly gwStructHead Struct

Properties:
Name Type Description
dataSize typed

int32

protocolType typed

int32

params object

pingTime number

retres number

timeout number

wakeupTime number

Type Definitions

A provider of Mobizen/Socket API.

Methods

accept(){number}

Returns:
Type Description
number error code

accessCode(state)

Name Type Description
state number
Fires:

accessDevice(accessToken)

Name Type Description
accessToken string
Fires:
Fires:
Fires:

dataChannelOpen()

Fires:

dataPack(payloadType, messageId, struct){Struct}

Name Type Description
payloadType number
messageId number
struct object
Returns:
Type Description
Struct packed data

dataReceive(data)

Name Type Description
data object
Fires:

failure(eventType, eventMessage)

Name Type Description
eventType string
eventMessage string
Fires:

getAgentName(){string}

Returns:
Type Description
string agent name

getProtocol(params){string}

Name Type Description
params object
Returns:
Type Description
string protocol

gwPack(protocolType, struct){Struct}

Name Type Description
protocolType string
struct Struct
Returns:
Type Description
Struct packed data
Fires:

localChannelOpen()

message(message)

Name Type Description
message string

natModeFailure(disabled)

Name Type Description
disabled boolean
Fires:

natModeOpen()

screenChannelOpen()

usbModeFailure(disabled)

Name Type Description
disabled boolean
Fires:

usbModeOpen()

usbReceive(data)

Name Type Description
data object
Fires:

wwwModeFailure()

Fires:

wwwModeOpen()

Fires:

wwwReceive(data)

Name Type Description
data object
Fires:

inner ab2hex(buf){string}

Name Type Description
buf arrayBuffer
Returns:
Type Description
string hexCodes - like 0x00

inner ab162str(buf){string}

Name Type Description
buf arrayBuffer
Returns:
Type Description
string charCodes

inner extend(destination, source){object}

Object Extend

Name Type Description
destination object
source object
Returns:
Type Description
object extended object
comments powered by Disqus