what is the right way to send a message in chat tokio example #3217
Replies: 3 comments 2 replies
-
Can you share your code in a runnable form please? |
Beta Was this translation helpful? Give feedback.
-
The code is the tokio chat example from my understanding of the OP but i don't understand how it's being executed. I do so with the following in root dir of a clone of the git repo: It's important to keep in mind the chat examples use readline and send one line at a time not one character. You have to press enter to send. |
Beta Was this translation helpful? Give feedback.
-
Thanks for reporting @Sherlock-Holo. I believe the issue is that the peers are not subscribing to the floodsub topic. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I tried the chat tokio example with a little modify https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=9c1d41fdaba91643fd4ef5da659ec7d7
then I run
./rust_learn
, it outputthen I try run another one with
./rust_learn /ip4/127.0.0.1/tcp/37031
, it outputthe first one new output is
I press
abc
in the first one terminal, hope send the message to another one, however that's nothing message receive in the second terminalhow should I do to send a message from one node to another node in the chat tokio example
Beta Was this translation helpful? Give feedback.
All reactions