New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

adminweb/resonance

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adminweb/resonance

An agnostic framework PHP library for realtime.

Source
Packagist
Version
1.5.1
Version published
Total downloads
35
Maintainers
1
Created
Source

Resonance

An agnostic framework PHP library for realtime.

Requirements

PHP >= 5.5

Redis Server

NodeJS >= 6

Installation

composer require adminweb/resonance

Usage

Install the Resonance server

Start the Resonance server in background with forever or PM2.

Implements the Resonance\BeatInterface on your classes on your app.

Create a new Bell instance for use touch (method) your beat (implements BeatInterface) (like example folder).

On Front

Put a tg script with src attribute with value http://server-address:server-port/socket.io/socket.io.js.

Initialize the connection with

var conn = io.connect('http://server-address:server-port/your-channel');
conn.on('your-event',function(music){
console.log('your music', music)
});

Be happy =D

FAQs

Package last updated on 23 Jul 2017

Related posts