Add small messaging protocol description

This commit is contained in:
Horhik 2021-03-11 09:54:35 +03:00
parent acd8be2628
commit 0456787c9e
3 changed files with 32 additions and 0 deletions

32
Protocol.md Normal file
View File

@ -0,0 +1,32 @@
# Hole Protocol
## Process of messaging
Each user have kind of a bin among freenet network,in which anyone can put message. And for each user this bin is his `USK insert` key. Each message signed by sender. And user can answer to sender, buy putting message at sender insert key if he know it.
## Message request
To receive a new message we have to send `ClientGet` to our `USK request` key with URI like `/user_id-message_version`. As well, the identifier is consists of `user_id-message_number`
For example:
```Bash
ClientGet
URI=USK@myMessageBinKey/messages/user5678-3
Identifier=request-user5678-3
Verbosity=0
ReturnType=direct
EndMessage
```
## Message sending
To send a message to a friend we putting it at his `USK insert` key, with URI like`/my_id-$(number_of_messages_to_this_user + 1)`. And identifier like `user_id-$(number_of_messages_to_this_user + 1)`
For example:
```Bash
ClientGet
URI=USK@myFriendBinKey/messages/user3246-5
Identifier=user3501-5
Verbosity=0
ReturnType=direct
EndMessage
```
## user IDs
- [ ] Probably, for each pair of each people we will have different identifier but... I'm not going to do it in further releases. *TODO*

BIN
hole.db

Binary file not shown.

View File