Direct messages and arbitrary data transfer between peers. #2157
Replies: 3 comments 9 replies
-
Yes. If you just want to send a single message with an optional response then you can use Anything more elaborate will require implementing your own
That would publish the JSON under this topic yes. All peers subscribed to this topic and currently online would receive the message.
Rust-libp2p and libp2p in general provides a lot of things out-of-the-box like authentication, multiplexing etc. I can recommend reading through some of the libp2p specs to get an idea: https://github.com/libp2p/specs For example, there is the |
Beta Was this translation helpful? Give feedback.
-
In case that it helps, we did something similar in our project: https://github.com/iotaledger/stronghold.rs/blob/322a6b6960ba4d8b47db459b2f66745d8464a3e7/communication/src/behaviour/protocol.rs#L50
|
Beta Was this translation helpful? Give feedback.
-
I've been able to replicate the request/response protocol for my data, but I now need to get the message out the |
Beta Was this translation helpful? Give feedback.
-
Hi! I'm new to libp2p (and rust), so I'm working through the examples. Right now I'm working through the chat-tokio.rs example and I think I understand how it works pretty well. There are a couple of things that I'm confused about doing:
Connection
trait, but I couldn't figure out how to implement it. Would this require some sort of new network behavior?Any help would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions