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
promise-emit all messages that are not handled automatically
Since the general node and EventEmitter approach doesn't work well with async/await, I believe I'll be using a pattern of let message = await session.accept(); to more closely model the familiar pattern found in Go and other languages.
Through my work with https://github.com/dashhive/DashJoin.js and https://github.com/dashhive/DashGov.js I believe I've discovered the minimal layer of abstraction that maximizes practical use of the P2P network without a strong dependency on a particular type of network proxy or protocol.
inv
messagesSince the general node and EventEmitter approach doesn't work well with async/await, I believe I'll be using a pattern of
let message = await session.accept();
to more closely model the familiar pattern found in Go and other languages.This will probably become a hard dependency of DashJoin.js, and future P2P development I DashGov.js (if any). It's almost as lightweight as https://github.com/dashhive/DashTx.js/pull/79/files#diff-dcba0694ad59e9893af33895826b399745c8e3ace322c260c2e9ab5244bb0427, but just not quite lightweight enough to justify inclusion.
The text was updated successfully, but these errors were encountered: