Commit Graph

3 Commits

Author SHA1 Message Date
Sijie.Sun
24178bcf6e use peer center instance to gatter peers info (#21)
* use peer center instance to gatter peers info
2024-02-29 00:04:48 +08:00
Sijie.Sun
7f8935a9d5 introduce peer center (#13)
peer_center is used to collect peer info into one peer node.

the center node is selected with the following rules:

1. has smallest peer id
2. TODO: has allow_to_be_center peer feature

peer center is not guaranteed to be stable and can be changed when peer enter
or leave.  it's used to reduce the cost to exchange infos between peers.
2024-02-06 13:29:12 +08:00
sijie.sun
9779923b87 Initial Version 2024-01-27 15:12:30 +08:00