Ping example doesn't work
PC 1:
C:\j2534-http>.\ping.exe
Local peer id: PeerId("REDACTED")
Listening on "/ip4/192.168.10.205/tcp/54002"
Listening on "/ip4/100.92.72.177/tcp/54002"
Listening on "/ip4/127.0.0.1/tcp/54002"
PC 2:
C:\j2534-http>.\ping.exe /ip4/REDACTED/tcp/54002
Local peer id: PeerId("REDACTED")
Dialed /ip4/REDACTED/tcp/54002
Listening on "/ip4/10.0.3.4/tcp/63362"
Listening on "/ip4/127.0.0.1/tcp/63362"
I never get an event back. What are my options here? I thought entire purpose of library was to ensure connectivity between two PCs.
You would need to give us more context in order to help you. What network are you running on? What is the output run with RUST_LOG=debug? ...
Is it expected to get around blocked ports?
Only if you use hole punching. See https://docs.rs/libp2p/latest/libp2p/tutorials/hole_punching/index.html
After the connection is made through the relay server, does the traffic flow directly P2P or does all traffic still go through relay server?
After the connection is made through the relay server, does the traffic flow directly P2P or does all traffic still go through relay server?
Once the connection from A to B via R is established all data flows over R. Once A and B established a direct connection (hole punch) with the help of libp2p-dcutr and R, both the direct connection and the relayed connection exist. Given that the direct connection is faster and given that the relayed connection is limited and after some time and bytes terminates, the direct connection will prevail.