marigold-dev / pollinate

A platform agnostic library for P2P communications using UDP and Bin_prot
22 stars 2 forks source link

Adding peers by address #53

Closed rosalogia closed 2 years ago

rosalogia commented 2 years ago

SUMMARY: Node function for adding a peer via Address.t

MOTIVATION: End users will expect the ability to easily add peers by specifying nothing more than their address, rather than having to worry about a bunch of conversions between Types.node and Peer.t and so on.

rosalogia commented 2 years ago

Seems like Client.add_peer is never used as-is internally, so I'm just going to change that function to use Address.t and have a Client.add_peer_as_is for adding Peer.t directly.