some dependency updates
This commit is contained in:
parent
0c7c7b736b
commit
0802c42f8c
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -1,4 +1,6 @@
|
||||||
/target
|
/target
|
||||||
./hole.db
|
./hole.db
|
||||||
hole.db
|
/hole.db
|
||||||
*.db
|
/*.db
|
||||||
|
|
||||||
|
|
||||||
|
|
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -408,9 +408,10 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fcpv2"
|
name = "fcpv2"
|
||||||
version = "0.0.1"
|
version = "0.0.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"regex",
|
"regex",
|
||||||
|
"rusqlite",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -630,6 +631,7 @@ dependencies = [
|
||||||
"async-tls 0.10.0",
|
"async-tls 0.10.0",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"async-tungstenite",
|
"async-tungstenite",
|
||||||
|
"chrono",
|
||||||
"fcpv2",
|
"fcpv2",
|
||||||
"futures",
|
"futures",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
|
|
|
@ -22,6 +22,7 @@ serde = "1.0.116"
|
||||||
serde_derive = "1.0.116"
|
serde_derive = "1.0.116"
|
||||||
async-trait = "0.1.42"
|
async-trait = "0.1.42"
|
||||||
simple_logger = "1.11.0"
|
simple_logger = "1.11.0"
|
||||||
|
chrono = "0.4.19"
|
||||||
|
|
||||||
[dependencies.fcpv2]
|
[dependencies.fcpv2]
|
||||||
path = "../FCPv2"
|
path = "../FCPv2"
|
||||||
|
|
32
Protocol.md
32
Protocol.md
|
@ -1,32 +0,0 @@
|
||||||
# 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*
|
|
|
@ -7,8 +7,8 @@ use tokio::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
use fcpv2::client::fcp_types::{ClientHello, ClientPut, FcpParser, SSK};
|
use fcpv2::client::fcp_types::{ClientHello, ClientPut};
|
||||||
use fcpv2::client::types::FcpRequest;
|
use fcpv2::types::{traits::{FcpRequest, FcpParser}, SSK} ;
|
||||||
pub async fn to_server_sender(mut sender: OwnedWriteHalf, server_receiver: RP) -> io::Result<()> {
|
pub async fn to_server_sender(mut sender: OwnedWriteHalf, server_receiver: RP) -> io::Result<()> {
|
||||||
while let Ok(res) = server_receiver.recv() {
|
while let Ok(res) = server_receiver.recv() {
|
||||||
//TODO from_core_to_server_handler
|
//TODO from_core_to_server_handler
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::chat::types::PackedMessage;
|
use crate::chat::types::PackedMessage;
|
||||||
use async_std::io;
|
use async_std::io;
|
||||||
use fcpv2::client::fcp_types::{ClientGet, SSK};
|
use fcpv2::client::fcp_types::{ClientGet};
|
||||||
use fcpv2::client::types::{FcpRequest, ReturnType};
|
use fcpv2::types::{traits::FcpRequest, ReturnType, SSK};
|
||||||
use std::sync::mpsc::Sender;
|
use std::sync::mpsc::Sender;
|
||||||
|
|
||||||
type SP = Sender<PackedMessage>;
|
type SP = Sender<PackedMessage>;
|
||||||
|
|
Loading…
Reference in a new issue