-
Notifications
You must be signed in to change notification settings - Fork 0
/
rfc_protocol.txt
88 lines (77 loc) · 3.51 KB
/
rfc_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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Epitech 2021 G. Soisson
Category: Communication protocol M. Payant
N. Peter
My_teams Protocol
Abstract
This document provide a complete documentation for the communication
between the server and client on the Epitech project's my_teams.
Introduction
This document provide all information for our project about communication.
Our goal is to provide a good protocol that allow us, to creat a new command
easily and improve the existing one.
Syntax
Each command is composed by a tag a space and a value and terminated by
\r\n.
[Command] [Space] [Value]
Example: LOG ['user_name']\r\n
Command and return
When you send a command to the server he send back a command you have to
read. This command is composed by a code a space and a description ended
by \r\n.
[Code] [Space] [Description]
101 ['uuid user_name']\r\n
List of command
HELP [] List all available command
LOG ['user_name'] Connection to the server
OUT [] Disconnection from the current
server
USERS [] List all user on the server
USER ['user_uuid'] Get information from specified user
SEND ['user_uuid'] Send a message to a specified user
['body_message']
MSG ['user_uuid'] List all message from specified user
SUBC ['team_uuid'] Subscribe to a specified team
UNSUB ['team_uuid'] nsubscribe from a specified team
SUBED ?['team_uuid'] List all subscribed teams or list
all users subscribed to a team
USE ?['team_uuid'] Specify a context (team/channel/
thread)
?['channel_uuid]
?['user_uuid']
CREA ['context_name'] Create a resources based on the
context
?['context_desc']
LIST [] List all sub resources based ont
the context
INFO [] List the current information based
on the context
List of return
101 Connection successful
401 Connection denied
102 Disconnection successful
103 List the help
104 List of users
105 Information about user
106 Message successfully sent
107 List with all messages
108 Subscribe to a team
109 Unsubscribe from a team
409 Cannot unsubscribe from a team
110 Specify a context
410 Cannot specify the context
111 Create a new resources
411 Cannot create a new resources
112 List all sub resources
412 Cannot list all sub resources
113 List information on the current context
413 Cannot list information
114 List subscribed team
404 Command not found
402 Not logged
222 Event on server
439 Already exist
440 Action not authorized
441 Unknow team
442 Unknow channel
443 Unknow thread
444 Unknow user