Methods
(static) registerToNative(callback)
Please see the definition of module:thaliMobileNativeWrapper~peerAvailabilityChanged
In addition to what is written there the following applies to the native implementation: The native layer MUST NOT send peerAvailabilityChanged callbacks more frequently than every 200 ms. This is to prevent starving out the node.js main thread. Therefore updates that become available before the next transmission MUST be queued up in the native layer and then sent at once to node.js using the array capability of peerAvailabilityChanged. We also MUST keep the total size of these notifications down (e.g. don't DOS node). So if we are getting lots of repeated announcements we can throw those away and if we are just getting large numbers of unique announcements then it's better to drop some than starve out Node.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
module:thaliMobileNative~peerAvailabilityChangedCallback |