happy-monkey / websocket-server
Installs: 653
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/happy-monkey/websocket-server
Requires
- ext-json: *
- cboden/ratchet: ^0.4.2
- league/event: ^2.2
README
Install
composer require happy-monkey/websocket-server
Messages format
{
"action": "actionName",
"data": mixed | null,
"room": "room_id" | null
}
If a message is received, server will look for a method called onActionName
and execute it. Callback will take 3 arguments :
- Client object of sender
- Data of message
- Room object if a room with
room_id
if exists
Angular WebSocket client service
See https://www.npmjs.com/package/@happymonkey/websocket-client