miya0001 / wp-socketio-emiter
Installs: 1 038
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:Shell
Requires
- php: >=5.4
- wisembly/elephant.io: ^3.1
This package is not auto-updated.
Last update: 2024-12-21 19:47:46 UTC
README
Getting started
$ composer require miya0001/wp-socketio-emiter
Example
use miya0001\WP;
$io = new SocketIO_Emiter( 'http://example.com/', 3000 );
$io->send( 'broadcast', [ 'name' => 'John', 'message' => 'hello' ] );
With namespace
use miya0001\WP;
$io = new SocketIO_Emiter( 'http://example.com/', 3000 );
$io->send( 'broadcast', [ 'name' => 'John', 'message' => 'hello' ], '/mynamespace' );