- Status: Normative specification
- Protocol identifier:
cecr/1 - Supersedes: CECR v1.2, v1.1, v1.0, and the original CECR design note (CECR draft 0)
- Changes in v1.1: a routed message always leaves. Where v1.0 stopped with
TARGET_NOT_LIVEorNO_PROGRESS, a node now forwards on its other paths (Section 8.3, step 9). Loop-freedom comes from the mandatory duplicate cache rather than from strict XOR progress alone (Sections 8.3 and 12). Measured on a 50-peer partial mesh, v1.0's refusals delivered 35/50 routed messages while gossip broadcast delivered 2450/2450. - Changes in v1.2: nodes learn routes from what arrives. A broadcast or routed message proves the link it came over leads back to its origin, and a small route ack sent back up a broadcast's path proves the forward links (Section 8.5). A routed message tries a fresh learned route before the greedy order (Section 8.3, step 4). With v1.1 alone, a 50-peer partial mesh delivered
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // PeerPigeon Streaming Patterns Examples | |
| // Who calls startMedia() determines the streaming pattern | |
| // ============================================================================= | |
| // 1:1 (One-to-One) Streaming - Video call between two people | |
| // ============================================================================= | |
| const peer1 = new PeerPigeon.PeerPigeonMesh({ | |
| enableCrypto: true, | |
| autoConnect: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example useage at the bottom | |
| async function generateTOTP(username, secret, issuer, rotation, digits) { | |
| let totp = () => { | |
| return new Promise((resolve) => { | |
| let counter = TOTP.getCurrentCounter(rotation); | |
| TOTP.otp(secret, counter, digits, (cb) => { | |
| resolve(cb); | |
| }); | |
| }); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| Adapted from Rebecca Manzi's [Todo App](https://github.com/rebeccamanzi/quasar-todo) for Quasar 1.0.0. This one works | |
| correctly with Quasar 2.11.5. To use it, update quasar.config.js > frameworks > plugins to include 'Notify' in the plugins | |
| array. | |
| --> | |
| <template> | |
| <q-page class="bg-grey-3 column"> | |
| <div class="row q-pa-sm bg-primary"> | |
| <q-input |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const http = require('http') | |
| const Gun = require('gun') | |
| // Uncomment for ES6, and remove requires above | |
| // import http from 'http' | |
| // import Gun from 'gun' | |
| const server = http.createServer() | |
| const host = 'localhost' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * NOTE: Does not work with npm installed heroku-cli | |
| * Uninstall with: npm uninstall heroku -g | |
| * Install Heroku with: curl https://cli-assets.heroku.com/install.sh | sh | |
| */ | |
| const { exec } = require('node:child_process') | |
| const expect = require('../expect') | |
| describe('Heroku deploy', function(){ | |
| it('Returns an error if heroku CREATE fails', async function(){ |