A NetworkAdapter which uses BroadcastChannel
to communicate with other peers in the same browser tab. This is a bit of a
hack because NetworkAdapters are supposed to be used as point to
point communication channels. To get around this the BroadcastChannelNetworkAdapter
broadcasts messages to all peers and then filters out messages not intended
for the current peer. This is quite inefficient as messages get duplicated
for every peer in the tab, but as it's all local communication anyway
it's not too bad. If efficiency is becoming an issue you can switch to
automerge-repo-network-messagechannel.
A
NetworkAdapter
which uses BroadcastChannel to communicate with other peers in the same browser tab. This is a bit of a hack becauseNetworkAdapter
s are supposed to be used as point to point communication channels. To get around this the BroadcastChannelNetworkAdapter broadcasts messages to all peers and then filters out messages not intended for the current peer. This is quite inefficient as messages get duplicated for every peer in the tab, but as it's all local communication anyway it's not too bad. If efficiency is becoming an issue you can switch toautomerge-repo-network-messagechannel
.