Chat for DS Lab (SNE)
- Golang
- GTK3+ (gotk3)
- GORM / sqlite3
Each packet has a structure defined below. Each packet should begin with uint16
data length which is followed by uint16
operation code. After this, actual data of the packets begins. We implemented following packets.
- SenderID
uint64
- UserID
uint64
(0 if not defined) - GroupID
uint64
(0 if not defined) - MessageLen
uint16
- MessageContent
utf8
- NameLen
byte
- Name
utf8
Responses:
- 406: Not Acceptable. No data. Name is taken.
- 200: OK. Data: ChatID
ChatID
- UserID
uint64
Response 404 or 200 with data:
- nameLen
byte
- name
utf8
- NameLen
byte
- Name
utf8
- PasswordLen
byte
- Password
utf8
- NameLen
byte
- Name
utf8
- PasswordLen
byte
- Password
utf8
- nameLen
byte
- name
utf8
Response 404 or 200 with data:
- UserID
uint64
- UserID
uint64
Response 404 or 200 with data:
- nameLen
byte
- name
utf8
- UsersCount
uint
- UserID
uint64
...
Response 8 with data on the subscription:
- UsersCount
uint16
- UserID
uint64
- Online
byte
...
- NameLen
byte
- Name
utf8
- PasswordLen
byte
- Password
utf8
- 200: OK.
- 400: Bad syntax.
- 401: Unauthorized. No data.
- 404: Not found. No data. Used in auth to notify that user doesn't exist.
- 406: Not Acceptable. No data. Used in registration to notify that data is not valid.
- 409: Conflict. No data. Used to notify that user already connected.
- 423: Locked. No data. Used in auth to notify a user that password is wrong.