send a message to a specific peer #4313
-
suppose I have connected with many peers in a swarm. I wanna send my message to a specific one or multiple (specific peers). how can I do that? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
You can use https://github.com/libp2p/rust-libp2p/blob/master/protocols/request-response/src/json.rs |
Beta Was this translation helpful? Give feedback.
-
See this part of document. |
Beta Was this translation helpful? Give feedback.
You can find a code snipped with
Swarm
in https://github.com/libp2p/rust-libp2p/blob/master/protocols/request-response/tests/ping.rs.