libp2p / cpp-libp2p

C++17 implementation of libp2p
Apache License 2.0
344 stars 97 forks source link

Not able to see other machine's messages in gossip chat example #177

Open PaTiToMaSteR opened 2 years ago

PaTiToMaSteR commented 2 years ago

hey guys! glad to be here, I'm really having trouble as I don't see any tutorials and I cannot see the messages in GOSSIP chat example between 2 different machines. Machine A:

./example/03-gossip/gossip_chat_example -p 4444
I am /ip4/127.0.0.1/tcp/4444/p2p/12D3KooWG1PJZvLidoYh1AfvZ9aytAaSmgHSW58xrsaEm9abSJgq

Machine B:

./gossip_chat_example -p 4444 -r /ip4/PUBLIC_IP/tcp/4444/p2p/12D3KooWG1PJZvLidoYh1AfvZ9aytAaSmgHSW58xrsaEm9abSJgq
I am /ip4/127.0.0.1/tcp/4444/p2p/12D3KooWNpH8bakYn6uPn4veXp8QFMGFn6sPiaZJPjozYQchReJ9

I'm supposed to connect like that? because I see only my own messages, not the other machine. I really appreciate any help! It's taking me days to understand why is not working -_-U

this: https://github.com/libp2p/cpp-libp2p/tree/master/example/03-gossip

PaTiToMaSteR commented 2 years ago

https://github.com/libp2p/cpp-libp2p/tree/master/example/03-gossip