peer-cdn

peer-cdn

  • Docs
  • Help
  • GitHub

›Plugins

Quick Start

  • Installation
  • Service Worker
  • Browser Client

Plugins

  • Peer Plugin
  • Network Plugin
  • Delegate Plugin

Router

  • Router
  • Middleware
  • Strategies

Server

  • Server

Example

  • Example

Peer Plugin

Plugins are factories for middleware allowing you to create more complicated logic used by peer-cdn.

This is where main logic of peer-cdn is handled. Currently due to lack of support for WebRTC in the service workers is used with DelegatePlugin to be handled on client side. Creates middleware which asks other connected peer for a given resource and if found downloads it from other peers instead of server.

Source code

Please see source: Peer.js

← Browser ClientNext →
  • Source code
peer-cdn
Docs
Documentation
Community
Support
More
rafallorenz.comGitHubStar
Copyright © 2022 Rafał Lorenz