libp2p / go-libp2p

libp2p implementation in Go
MIT License
6.08k stars 1.07k forks source link

How could I know when a peer is shutdown #1069

Closed ItsFunny closed 3 years ago

ItsFunny commented 3 years ago

I am a newbee for this library,And I got a question for Stream

I learned from the go-libp2p-examples Here Are my Questions

mearaj commented 3 years ago

Hi, I have read the discussion on the same or may be similar question. Hope this link may help you https://discuss.libp2p.io/t/how-to-check-if-a-stream-is-already-open-with-peer/249/3 Regards :)

ItsFunny commented 3 years ago

Hi, Thanks for the answer ; But it seems not enough to solve my question , I was wandering if I have to write another protocol to detected whether peer is dead or not (but I think libp2p already did this ? right ? pingProtocol?) Thanks anyway

mearaj commented 3 years ago

I have created a chat app using Gioui and Libp2p. The app is also published at Playstore, Protonet. Going to make it open source in a day or two. Then hopefully you and others will be able to see it's source code. Thanks :)

mearaj commented 3 years ago

Hi @ItsFunny and everyone, Here is the link to a project that uses libp2p Protonet Playstore link is Protonet