-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprotocol.txt
51 lines (35 loc) · 873 Bytes
/
protocol.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Port: 7777
Little endian
ASCII
Reg/Auth: 01
Register
01 00 <id len (1 byte)> <id> <pwd len (1 byte)> <pwd>
Reg state
01 01 <Success (0)/ Fail (1) (1 byte)>
login
01 02 <id len (1 byte)> <id> <pwd len (1 byte)> <pwd>
login state
01 03 <Success (0)/ Fail (1) (1 byte)>
login out
01 04
Message: 02
Send Msg
02 00 <receiver sn (1 byte)> <msg len (1 byte)> <msg>
receiver sn = 255: boardcase
Open file
02 01 <receiver sn (1 byte)> <fname len (1 byte)> <file name>
File handle
02 02 <handle (4 byte)>
handle = 0xFFFFFFFF: Fail
file request
02 03 <handle (4 byte)> <sender sn (1 byte)> <fname len (1 byte)> <file name>
file response
02 04 <handle (4 byte)> <OK(0) / Reject (1)>
File content
02 05 <handle (4 byte)> <len (1 byte)> <content>
Close handle
02 06 <handle (4 byte)>
Control: 03
User
03 00 <Sn> <id len (1 byte)> <id> <flag>
flag = 0: offline, 1: online