-
Notifications
You must be signed in to change notification settings - Fork 0
/
TcpProtocol.json
68 lines (65 loc) · 1.52 KB
/
TcpProtocol.json
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
"After Connection": {
"message": "${message}", // is a string -- Useless
"sessionsPort": "${port}" // is a number -- The UDP server port
},
"Available Requests": {
"login": { //path = route
"request": {
"path": "login",
"username": "${pseudo}" //is string
},
"response": {
"status": "True || False", //is a bool
"id": "${id}" //is a number -- my id on the server (maybe useless)
}
},
"session" : [ // need to be logged in
{
"request": {
"path": "session:list"
},
"response": {
"status": "True || False", //is a bool
"sessions": [
{
"name": "${name}", // is a string
"id": "${id}", //is a number -- session id on the server
"playerCount": "${playercount}", // is a number -- player in this session
"playerMax": "${maxPlayer}", // is a number -- do I have to explain this ?
}
]
}
},
{
"request": { //your are automatically connected to the created session
"path": "session:create",
"name": "${name}", // is string -- Session name
"playerMax": "${maxPlayer}" // is number
},
"response": {
"status": "True || False", //is a bool
"id": "${id}" // is a number -- Id of the session on the server
}
},
{
"request": {
"path": "session:join",
"id": "${id}"
},
"response": {
"status": "True || False"
}
},
{
"request": {
"path": "session:quit",
"id": "${id}"
},
"response": {
"status": "True || False"
}
}
]
}
}