-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
Hi, I'm about to use this library in a client-server project where the client should be able to discover servers in the lan.
I looked at the PeerDiscovery object and its attached methods. For me, it's strange how it is implemented. NewPeerDiscovery() creates this object and does a peer discover in a blocking way. Still PeerDiscovery has a Shutdown() method to stop discovery. But how should this work, if the object creation is blocking until discovering has been finished?
Wouldn't it be better to create the option, have a Serve() and Shutdown() method and get the notification about new peer via callback (or channel)?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels