You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working on the integration of LocalDiscovery and MapeoRPC for sync, I'm ending up with pieces of code throughout both MapeoManager and MapeoProject tying the pieces together. The sharing of peer names must update a peer list held somewhere, so we can expose listLocalPeers.
I think it makes more sense to encapsulate the code in a slightly modified version of the existing MapeoRPC class, handling device info events internally to update a property on the peer class and exposing the protomux instance so we can use the peers from here for sync / replication in project instances.
Public methods:
sendInvite()
sendInviteResponse()
sendDeviceInfo()
disconnectAllPeers() -> to be added post-MVP
Events:
peers - when the connected peers changes
invite - when an invite is received
The text was updated successfully, but these errors were encountered:
gmaclennan
changed the title
Create LocalPeers class for RPC and local discovery
Expand MapeoRPC to handle connections to local peers, and rename to LocalPeers
Oct 26, 2023
Description
Working on the integration of LocalDiscovery and MapeoRPC for sync, I'm ending up with pieces of code throughout both MapeoManager and MapeoProject tying the pieces together. The sharing of peer names must update a peer list held somewhere, so we can expose
listLocalPeers
.I think it makes more sense to encapsulate the code in a slightly modified version of the existing
MapeoRPC
class, handling device info events internally to update a property on the peer class and exposing the protomux instance so we can use the peers from here for sync / replication in project instances.Public methods:
sendInvite()
sendInviteResponse()
sendDeviceInfo()
disconnectAllPeers()
-> to be added post-MVPEvents:
peers
- when the connected peers changesinvite
- when an invite is receivedThe text was updated successfully, but these errors were encountered: